-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix debug module publication with shadow plugin #3357
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3d343e7
Fix debug module publication with shadow plugin
qwwdfsad 0289836
~tweak conf
qwwdfsad ca8ec34
~restore manifest compatibility
qwwdfsad 633eafb
Add integration test
qwwdfsad f090b09
~comments
qwwdfsad 6da4482
~remove unnecessary env
qwwdfsad e7e8aec
Update integration-testing/src/debugDynamicAgentTest/kotlin/DynamicAt…
qwwdfsad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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 find this very counterintuitive: if a task is not enabled, why does its configuration contribute to anything? I propose to move the
manifest
block toshadowJar
. If I understood correctly (and from a quick check of the resultingMETA-INF/MANIFEST.MF
in the published JAR), this shouldn't change the result, but it would look much more clear.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.
Checking further, I see that this line was lost from the manifest compared to the one published to Maven Central:
However, deleting the locally-published repo and reverting my change, I can't make this line return. No idea what's going on.
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.
Shadow jar extends the original jar task. Moved it to JAR task, it seems like the resulting published JAR contains the correct manifest.
It still worth to check it during the release tho
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.
That's what I was proposing to do, but then I noticed the
Class-Path
line disappearing from the manifest.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 previous version also does not generate
Class-Path
attribute.This is a nice catch, though I cannot convince myself that it actually ever affected anything.
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 is what I observed as well, yes, just wasn't sure.
Could you please try using the debug module in a minimal project as a dependency and check that everything still works, just to be safe? We do have integration tests for using it as a Java agent, but not for just using
DebugProbes
, right?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.
Restored it back, created #3361
Will push integration test soon as well