rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Handle python/Python dir/file in toolchain archive

Open fishcakez opened this issue 3 years ago • 2 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [x] Bugfix
  • [ ] Feature (please, look at the "Scope of the project" section in the README.md file)
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

What is the current behavior?

For python 3.8.10 on macos there is a Python directory in the python static archive. This conflicts with the symlink added in #782. Note that bazel "incorrectly" caches the repository tests so they may not run if the test code itself didn't change even if the repository rules do.

Issue Number: N/A

What is the new behavior?

Delete python directory/file before creating a symlink and tests pass.

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

We should look to ensure that repository integration tests aren't incorrectly cached for the toolchain in CI.

fishcakez avatar Aug 26 '22 17:08 fishcakez

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Aug 26 '22 17:08 google-cla[bot]

Will fix the CLA issue next week. buildkite is failing because require the fix of #803. Note the bug wasn't caught by CI because of #806.

fishcakez avatar Aug 26 '22 17:08 fishcakez

Sorry, I missed this PR. It ended up getting fixed here https://github.com/bazelbuild/rules_python/commit/2cdad9e18eda451e486737ff3cddc25ddd579c8e as I extracted the fix from the bigger change I was doing in https://github.com/bazelbuild/rules_python/commit/26526a501f5ee67b370744a76a3aa3cf98d212f4.

f0rmiga avatar Nov 02 '22 18:11 f0rmiga