🐛 fix: do not include agent if scope is only Test#37
Conversation
|
Just realized it may be worth adding a word in the README about this behaviour. Let me know what you think :) EDIT: added a sentence. |
|
|
||
| By default, sbt-javaagent will only add an agent to distributions. Agents can be optionally enabled for compile, run, or test. | ||
|
|
||
| > **Note**: starting from v0.2.0, if the agent is only in `test` scope, it won't be added do distributions. You can set the scope to `dist;test` to retain the previous behaviour. |
There was a problem hiding this comment.
ℹ️ I assume this PR would be released as a new minor, feel free to change this line if you prefer to release it as bugfix.
There was a problem hiding this comment.
We need to release at least a new minor version because in main branch we also dropped support for SBT 0.13.
Will take a look at this pr soon
|
@mkurz, may I ask if you're waiting for something else (on which I could help) to cut a release? I know you've got a tons of projects on the radar, don't get me wrong 😉 |
|
Ah there is even a ticket for sbt 2 already: #43 (opened by me ;) |
|
Any chance this could be released? I've got a lot of projects where I'd like to benefit from this. |
|
Could we get this released even if other pending changes are not ready yet? |
|
@gaeljw I will try to come to this week. |
Aims to fix #36
I've added 2 test projects:
Testscope => the java agent should not be added in distributionsTestscope but also another scope => the java agent is added in distributionsThe 2nd case is so that this fix is not a breaking change: users are used to not have to explicitly set the "dist" scope and get the java agent added by default. This behaviour is also covered implicitly by other existing test projects but I preferred adding one explicitly for that.