Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Scoverage work - add scoverage to OSS pants #8064
Scoverage work - add scoverage to OSS pants #8064
Changes from 10 commits
3ef8021
705a12b
5ea8fc5
fc48b64
21a5dd4
2429357
f432d7b
c7f560a
c427e21
324f59d
1a7e8fc
739032a
fc4ed94
3212da7
f9561dc
3d913e3
3209a9f
3cd1b8b
3099ac7
66ace61
3ff84cc
a47ef75
7bacd7b
d9a94e1
37295d6
f390ee4
b15f45d
ae22fed
e5b0a56
12430dd
04065ac
e13edd8
4e1b5c8
02435cc
ed7d4b0
7acd82c
d6a2dbc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: extra space?
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.
Pants supports
@file
options natively, so you should make this option a list option:And then someone who wants to put the list of targets in a file (in python list syntax) can pass
--blacklist-targets=@some-blacklist-file
.You could also pass in a (string) list of regexes to match against target names.
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 looks like this target is bootstrapped by default. If a user overrides this, the default //:scoverage target is still injected into the build graph.
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.
The blacklist should be cached in-memory, currently the file is read per target.
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.
If you switch this to a list option (as above) that will be handled automatically.
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.
Rather than fully overriding the set of plugins, this should merge both lists. Ditto the plugin args and options.
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.
the function
get_scalac_plugins
in scoverage_platform.py does that. It merges the list if initially non empty (otherwise creates a new one) Similarly, for plugin args and options, the merging happens inside the scoverage subsystem.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.
Ok. That's a bit confusing, because if someone were to change line 102 here, they would need to remember to change the subsystem code as well. IMO, the merging code should live in here to avoid that issue.
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.
There could be better decoupling here rather than checking
if self._scoverage
,possible suggestion could be something similar to: (plugins, may not not need to be passed in but could be a class variable 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.
See comment above regarding decoupling