Skip to content
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

ByteBuddy scope went beyond test in version 2.17.0 #4428

Closed
migmruiz opened this issue Mar 13, 2024 · 12 comments
Closed

ByteBuddy scope went beyond test in version 2.17.0 #4428

migmruiz opened this issue Mar 13, 2024 · 12 comments
Milestone

Comments

@migmruiz
Copy link

migmruiz commented Mar 13, 2024

It seems to me that this was a mistake introduced here
https://github.com/FasterXML/jackson-databind/pull/4254/files/

Originally posted by @migmruiz in #4254 (comment)

@JooHyukKim
Copy link
Member

Makes sense. Filed PR #4429 to address this. Thanks @migmruiz!

@cowtowncoder
Copy link
Member

UGH. ... and no one noticed/reported this during 2.17.0-rc1. Next time I think it might be best to avoid rc-phase altogether as we keep missing significant problems anyway.

Thank you @migmruiz for reporting this.

@cowtowncoder cowtowncoder changed the title ByteBuddy scope went beyond test in version 2.17.0 ByteBuddy scope went beyond test in version 2.17.0 Mar 13, 2024
@cowtowncoder cowtowncoder modified the milestones: 2.17.0, 2.17.1 Mar 13, 2024
@cowtowncoder
Copy link
Member

Fixed for 2.17.1.

@yihtserns
Copy link
Contributor

UGH. ... and no one noticed/reported this during 2.17.0-rc1.

Because users have no reason to suspect a new dependency that is not obviously test-only e.g. Mockito or JUnit? It is not like Byte Buddy is a lib that exists only to exclusively help in writing tests anyway e.g. Hibernate uses it. 🤷

I'm guessing @migmruiz noticed it either because he works in a place where every new lib needs justification, or this version of Byte Buddy caused version conflict in his project?

@cowtowncoder
Copy link
Member

Ahhh. Very good point that ByteBuddy is NOT regularly test(-only) dependency.
And I can see how for most users added unexpected dependency is hidden by tooling; besides, addition might have been intentional indeed.

Still all that said, I am disappointed that this was not caught and reported before .0 release -- consider the fact that right after 2.17.0 was released this was reported within 24 hours. So my point has more to do with vast difference of reports from "final" minor release vs. any of release candidates: this has been recurring theme. Not just this specific thing, but rate of issue reporting.

@norrisjeremy
Copy link

How soon will 2.17.1 be released so that ByteBuddy is no longer pulled in as a transitive dependency?

@pjfanning
Copy link
Member

How soon will 2.17.1 be released so that ByteBuddy is no longer pulled in as a transitive dependency?

If you read the comments, you will see that we believe that this is easily worked around. Every build tool that I am aware of has a way to exclude transitive dependencies.

@norrisjeremy
Copy link

How soon will 2.17.1 be released so that ByteBuddy is no longer pulled in as a transitive dependency?

If you read the comments, you will see that we believe that this is easily worked around. Every build tool that I am aware of has a way to exclude transitive dependencies.

I'm fully aware of that. But having to manually go thru tens of projects to add an exclusion that we would then turn around and remove after the next release is extremely tedious.
All I was asking was if you had a projected date as to when 2.17.1 would be released, so our team can evaluate if it's worthwhile to go through this exercise, or simply wait.

@pjfanning
Copy link
Member

How soon will 2.17.1 be released so that ByteBuddy is no longer pulled in as a transitive dependency?

If you read the comments, you will see that we believe that this is easily worked around. Every build tool that I am aware of has a way to exclude transitive dependencies.

I'm fully aware of that. But having to manually go thru tens of projects to add an exclusion that we would then turn around and remove after the next release is extremely tedious. All I was asking was if you had a projected date as to when 2.17.1 would be released, so our team can evaluate if it's worthwhile to go through this exercise, or simply wait.

There is no plan to release 2.17.1 yet. One option is to revert to 2.16.2.

chadlwilson added a commit to chadlwilson/gocd that referenced this issue Mar 17, 2024
Workaround minor issue introduced in Jackson 2.17.0 FasterXML/jackson-databind#4428
@cowtowncoder
Copy link
Member

@norrisjeremy Timeline depends on balance between number of fixes to get int vs urgency of getting specific high priority fixes out: given it takes 2.5 - 4 hours to do full release (like 2.17.1), this wouldn't yet qualify for doing 2.17.1 this week (for example).
The first .1 patch release typically gets released 4 - 8 weeks after the .0 release, so I think we'll get 2.17.1 out likely around mid-April. Unless something urgent comes up before that.

I hope this helps.

@chadlwilson
Copy link

chadlwilson commented Mar 21, 2024

To help people out, if you want to do this globally in one of the Gradle-canonical ways:

For simpler cases this will often do

dependencies {
  implementation('com.fasterxml.jackson.core:jackson-databind:2.17.0') {
    exclude(module: 'byte-buddy') // Workaround https://github.com/FasterXML/jackson-databind/issues/4428 until Jackson 2.17.1
  }
}

For more complex projects with api dependencies, multi-project builds and things where exclusions are evaluated in different contexts, you can apply this kind of component metadata rule "hammer" to your dependencies blocks (or add the same components block to settings.gradle's dependencyResolutionManagement block.

dependencies {
  components {
    // Workaround https://github.com/FasterXML/jackson-databind/issues/4428 until Jackson 2.17.1
     withModule('com.fasterxml.jackson.core:jackson-databind', { details ->
      details.allVariants { withDependencies { removeAll { it.name == "byte-buddy" } } }
    })
  }
}

@cowtowncoder
Copy link
Member

Thank you for sharing, @chadlwilson !

mawiesne added a commit to apache/opennlp that referenced this issue Apr 21, 2024
…dentally became a dependency of jackson-databind (see: FasterXML/jackson-databind#4428) updated to version 2.17.0 (via OPENNLP-1552)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants