-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add flag --incompatible_use_plus_in_repo_names #23103
Conversation
fe0843b
to
2a9ecaf
Compare
Defaults to false. When set to true, we use `+` instead of `~` as the separator in canonical repo names. Some more subtle changes include: - We now officially say that the "build" part of version strings (the part that begins with a plus) is ignored and stripped. - When the flag is set to true, we effectively increase the lockfile version by 1 (see code comment in BazelLockFileModule). - When true, we no longer insert a `_main` in front of names of repos generated by module extensions hosted in the main repo. (`~abc` as a name was problematic, but `+abc` is not.) - When true, we no longer insert a `v` in front of numerical versions in canonical repo names. (`my_mod~1.1` could be a Windows short path, but `my_mod+1.1` cannot.) Work towards #22865.
2a9ecaf
to
4c1a50b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very thorough, including removing the special cases that are now unnecessary.
How certain we are that +
is better than any other alternatives?
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/BazelDepGraphValue.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/BazelLockFileModule.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionId.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleKey.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleKey.java
Outdated
Show resolved
Hide resolved
Let's look at all printable non-alphanumeric ASCII characters:
So it looks like |
|
src/main/java/com/google/devtools/build/lib/bazel/bzlmod/BazelLockFileModule.java
Show resolved
Hide resolved
@Wyverald Can you file an incompatible issue to track this change? https://github.com/bazelbuild/bazel/issues/new/choose |
@bazel-io fork 7.3.0 |
Defaults to false. When set to true, we use `+` instead of `~` as the separator in canonical repo names. Some more subtle changes include: - We now officially say that the "build" part of version strings (the part that begins with a plus) is ignored and stripped. - When the flag is set to true, we effectively increase the lockfile version by 1 (see code comment in BazelLockFileModule). - When true, we no longer insert a `_main` in front of names of repos generated by module extensions hosted in the main repo. (`~abc` as a name was problematic, but `+abc` is not.) - When true, we no longer insert a `v` in front of numerical versions in canonical repo names. (`my_mod~1.1` could be a Windows short path, but `my_mod+1.1` cannot.) Work towards bazelbuild#22865. Closes bazelbuild#23103. PiperOrigin-RevId: 657202616 Change-Id: I015b2a04a823b1d951015a1b2e1b99b154dcc5a2
Defaults to false. When set to true, we use `+` instead of `~` as the separator in canonical repo names. Some more subtle changes include: - We now officially say that the "build" part of version strings (the part that begins with a plus) is ignored and stripped. - When the flag is set to true, we effectively increase the lockfile version by 1 (see code comment in BazelLockFileModule). - When true, we no longer insert a `_main` in front of names of repos generated by module extensions hosted in the main repo. (`~abc` as a name was problematic, but `+abc` is not.) - When true, we no longer insert a `v` in front of numerical versions in canonical repo names. (`my_mod~1.1` could be a Windows short path, but `my_mod+1.1` cannot.) Work towards #22865. Closes #23103. PiperOrigin-RevId: 657202616 Change-Id: I015b2a04a823b1d951015a1b2e1b99b154dcc5a2 Commit 2f67e57 Co-authored-by: Xdng Yng <[email protected]>
This PR essentially flips `--incompatible_use_plus_in_repo_names` (introduced in #23103) to true on master. In addition, it graveyards the flag, removes all logic to use `~`, and fixes all tests to use `+` instead. Closes #23098. RELNOTES: The format of canonical repo names has changed to use plus (`+`) instead of tilde (`~`). Effectively, this flips the flag `--incompatible_use_plus_in_repo_names` to true, and the flag is now a no-op (i.e. cannot be "unflipped"). PiperOrigin-RevId: 657913333 Change-Id: Ia97609049871db7a914fe3129556cf843d06f571
There was a slight, but I guess expected fallout, I had to switch some per_file_copt from
to
And because |
Defaults to false. When set to true, we use
+
instead of~
as the separator in canonical repo names.Some more subtle changes include:
_main
in front of names of repos generated by module extensions hosted in the main repo. (~abc
as a name was problematic, but+abc
is not.)v
in front of numerical versions in canonical repo names. (my_mod~1.1
could be a Windows short path, butmy_mod+1.1
cannot.)Work towards #22865.