-
Notifications
You must be signed in to change notification settings - Fork 316
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 'View project root' flag #6422
Conversation
aec3ccc
to
16a2cd7
Compare
16a2cd7
to
0af924b
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.
Approved with very minor comments! Thanks a lot for this change.
import com.google.idea.blaze.base.projectview.section.SectionKey; | ||
import com.google.idea.blaze.base.projectview.section.SectionParser; | ||
|
||
/** If set to true, automatically derives targets from the project directories. */ |
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 think this comment is out of date.
@@ -120,6 +121,7 @@ public void testProjectViewSetSerializable() { | |||
ScalarSection.builder(BuildConfigSection.KEY) | |||
.set(new WorkspacePath("test"))) | |||
.add(ScalarSection.builder(UseExclusionPatternsSection.KEY).set(false)) | |||
.add(ScalarSection.builder(ViewProjectRootSection.KEY).set(false)) |
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 add a test where we actually set it in a project view? We don't have to assert anything on the actual behaviour, I just want to check that it parses.
Remove comment for ViewProjectRootSection It's already commented in the PARSER definition
Oh, I can't just test it properly with the current test framework, because it converts |
That's fair, it's fine to leave the proper tests as a follow up. Do you think it would be hard to add a test that asserts that the section parses correctly? So a test that takes the string:
And asserts that the right Section is created. |
Ok, that's easy, could you take a look again? |
Yeah, looks good to me! Thanks for this change. |
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:
<please reference the issue number or url here>
Description of this change
Screen.Recording.2024-05-07.at.15.14.12.mov