-
Notifications
You must be signed in to change notification settings - Fork 304
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
Allow manual tags to be synced to the project #5085
Conversation
f13a2e7
to
a0d21b8
Compare
…gs to be synced in the repo.
a0d21b8
to
b4f3219
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.
@rogerhu I'm not sure, but it seems like it would be possible to add a test, a similar to this one
intellij/aswb/tests/integrationtests/com/google/idea/blaze/android/sync/AndroidSyncTest.java
Line 263 in 15314ca
public void testSimpleSync() { |
We could set "derive_targets_from_directories: true" there and then cover both cases when the new flag is set, and when it is not
81301b5
to
c63ca48
Compare
c63ca48
to
1d7d527
Compare
static class DefaultValueProvider implements ProjectViewDefaultValueProvider { | ||
@Override | ||
public ProjectView addProjectViewDefaultValue( | ||
BuildSystemName buildSystemName, | ||
ProjectViewSet projectViewSet, | ||
ProjectView topLevelProjectView) { | ||
if (!topLevelProjectView.getSectionsOfType(KEY).isEmpty()) { | ||
return topLevelProjectView; | ||
} | ||
return ProjectView.builder(topLevelProjectView) | ||
.add( | ||
TextBlockSection.of( | ||
TextBlock.of( | ||
"# Automatically targets tagged as manual to be synced"))) | ||
.add(ScalarSection.builder(KEY).set(false)) | ||
.add(TextBlockSection.of(TextBlock.newLine())) | ||
.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.
This makes the flag visible in the default project view generated by IntelliJ. In general, we have many flags, but we put only the most important ones to the default project view. How about removing this section at all, and keep the flag hidden in the default project view? Apart from this, I think we can merge it
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.
Removed for now! Any suggestions for what docs to modify?
6ae447c
to
101abd7
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.
Thank you @rogerhu!
return false; | ||
} | ||
parseContext.addError( | ||
"'allow_manual_tags_sync' must be set to 'true' or 'false' (e.g." |
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 supposed to use allow_manual_targets_sync
probably?
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.
Yep fixed here: #5197
@rogerhu @tpasternak Can we have this documented somewhere next to https://ij.bazel.build/docs/project-views.html#derive_targets_from_directories ? I'm keep sharing the issue for this PR, when our engineers asking what this tag even is, but I think docs supposed to reflect such properties. |
Filed a ticket #5590 since apparently the docs are not hosted in open source land. =) |
Checklist
Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.
Discussion thread for this change
Issue number: #4546
Description of this change
Adds a
allow_manual_targets_sync: true
in the .bazelproject to allow manual tags.