-
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
Adjust --top_level_targets_for_symlinks #18854
Changes from all commits
8d0daaa
38a25d1
dbecfb5
71a02bf
d1b66b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,7 +169,9 @@ static ImmutableList<ConvenienceSymlink> createOutputDirectoryLinks( | |
eventHandler.handle( | ||
Event.warn( | ||
String.format( | ||
"cleared convenience symlink(s) %s because their destinations would be ambiguous", | ||
"cleared convenience symlink(s) %s because they wouldn't contain " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like that this is more detailed now, but I could see this message being intimidating for the end user who is usually not the author of the self transition. I have a hard time coming up with something simpler though that would still be precise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. I hope this is at least a signal to ask for expert help with a clearly diagnosable message. But yes end-user friendly messages would always be great. This is probably getting off-topic but I like the error pattern idea of a super-concise non-intimidating message with a link to a help page with more context. That page can contextualize as much as needed and distinguish user vs. expert content and not be so overwhelming at the CLI. |
||
+ "requested targets' outputs. Those targets self-transition to multiple " | ||
+ "distinct configurations", | ||
Joiner.on(", ").join(ambiguousLinks)))); | ||
} | ||
return convenienceSymlinksBuilder.build(); | ||
|
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.
Should we include this case?
Pro: the symlink has nothing useful
Con: this will trigger when
$ bazel build //...
doesn't include any tests, since--trim_test_configuration
will remove test options from all targets. Users may be confused why there are no symlinks.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.
Could you elaborate on the Con? Does
--trim_test_configuration
result in duplicate configs? If so, could we somehow recognize when a config differs from the top-level config only in test options and ignore those configs here to fix the Con?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.
It's just a con in that it means
bazel-bin
will still be deleted more than users expect. If$ bazel build //:all
expands to 10 binaries, where only 1 has a self-transition,bazel-bin
will still be deleted. If$ bazel build //:all
also includes a test,bazel-bin
will show up.Worse, the non-transitioning binaries would actually appear in
bazel-bin
if it wasn't deleted. Even though they lackTestOptions
they still have the samebazel-out/foo-bar/bin
path because that instance of config trimming doesn't affect paths.I'd rather not get into explicitly examining the configuration diffs. Another approach is to not compare the configs but their output paths.
Latest commit implements that, and manual testing shows intuitive results (I tried every combo of test, non-transitioning non-test, transitioning non-test).
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.
I like that change, comparing paths instead of configs makes sense as those are all we care about in the end.