Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration path for py23 proposal #153

Merged
merged 4 commits into from
Jan 10, 2019
Merged

Update migration path for py23 proposal #153

merged 4 commits into from
Jan 10, 2019

Conversation

brandjon
Copy link
Member

@brandjon brandjon commented Jan 7, 2019

This splits the syntactic and semantic changes into separate migration flags. The experimental flag for syntax is 100% backwards compatible.

This way, we can flip and eliminate both experimental flags before the incompatible changes are introduced. This allows us to do the incompatible change procedure in a single Bazel release cycle.

@brandjon brandjon merged commit d03c5fb into master Jan 10, 2019
@brandjon brandjon deleted the py23-flags branch January 10, 2019 23:56
bazel-io pushed a commit to bazelbuild/bazel that referenced this pull request Jan 14, 2019
This CL implements the bulk of the changes to the migration section of the design doc, described by PR bazelbuild/rules_python#153. A subsequent CL will do the flag rename from --experimental_better_python_version_mixing to --experimental_allow_python_version_transitions.

The main changes in this CL are:

  1. Instead of one experimental/incompatible flag, we have two: one for syntax and one for semantics.

  2. The new API (--python_version flag and python_version attribute) is no longer guarded by an experimental flag, but rather is unconditionally available.

  3. The old API (--force_python flag and default_python_version attribute) is now disabled by an experimental flag. (This was always the plan but this CL implements it.)

The motivation for (1) is so that it's easier for users to migrate and easier for us to roll these changes out. It also simplifies some logic in PythonOptions.java and python_version.bzl, because the fallback from --python_version on to --force_python no longer cares about whether we're using the new or old semantics.

The motivation for (2) is that the current logic for gating an attribute on an experimental/incompatible flag breaks native.existing_rules(). See #7071. In this case the experimental flag would have been very short-lived anyway, since we want these features to be migration ready by February. We still have to face #7071 before we can enable the incompatible change, but at least this CL unblocks further work without hacking up existing_rules() with ad hoc blacklists.

Finally, I took this CL as an opportunity to downsize some of our shell integration tests by turning them into Java unit tests. This required updating the mocks a bit.

Work towards #6583.

RELNOTES: None
PiperOrigin-RevId: 229261233
bazel-io pushed a commit to bazelbuild/bazel that referenced this pull request Jan 15, 2019
As per bazelbuild/rules_python#153, this renames --experimental_better_python_version_mixing to --experimental_allow_python_version_transitions.

Work towards #6583.

RELNOTES: None
PiperOrigin-RevId: 229274690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants