-
Notifications
You must be signed in to change notification settings - Fork 31
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
Gradle reports incorrect jackson-bom dependency version #52
Comments
@jjohannes would be the person who knows, I think. Micro-patch handling is tricky, not sure what could be done here. |
If the version number of micro-patch releases are not aligned -- which I was not aware of when adding the above configuration -- I would suggest to alway link to the latest major.minor version of the BOM. You can still upgrade individual components to their micro-patch release then. Or use one of the newer BOMs directly. Would that make sense?
We have to figure out how to get hold of |
@jjohannes Just to make sure I understand: are you suggesting that But there is one related aspect that I'd like to ensure works as well: from users perspective there is benefit from bom that would have the combination of
This would allow users to refer to BOM from (2) but without creating inconsistent loop for (1). One possible kink, though, is this: |
I guess I may be overthinking this, fwtw, since I am not only considering module plugin but more generally version resolution by tooling. This is due to my non-OSS work where for a while I was working on figuring out how transitive dependencies are resolved, vulns reported against them, possible automated upgrades and such. This is a rather complicated area (as I am sure everyone participating here knows :) ) due to version conflicts that transitive closure brings in -- and then different strategies in selecting the "real" version. Having said that it does seem to me that what I outline above would be workable. I will try to verify this locally and then think I'll proceed with 2.12.6.1 release. And given the metadata issue I may (have to) consider releasing otherwise change-less |
@cowtowncoder yes what you describe works. And it it basically what I tried to say. I only missed the parent pom part, which ist a nice solution I think. And yes. A user can still use the If you want to go with that solution but still run into issues, let me know. |
I think the "best" solution in genreal would be to not have timestamp BOMs, but instead have a BOM for each micro version. So for the current situation there would be a BOM |
@jjohannes I think date-based (realized "timestamp" is bit misleading) may actually better solution personally, for the main use case: extending set of boms for otherwise closed branches. Problem with attempts to use full 4-digit version is that this is not only more complicated to handle (2.13.2.3 of jackson-databind along with 2.13.2.1 of jackson-dataformat-xml, latter of which is released after former, for example, is a possibility) but gives wrong impression of there being a full set of components. Use of date only offers sorting to indicate "which BOM is later" (and has more up-to-date set). I guess it would be possible to just increment bom micro-patch version, but honestly I also do not see any benefit to the user: you cannot really arbitrarily increase that number but have to use some specific version. And for that date-based version works fine, see f.ex: https://mvnrepository.com/artifact/com.fasterxml.jackson/jackson-bom as long as there's no mixing of sequence numbers and date-based. Be that as it may, at this point I will not be changing this aspect. But I will proceed to change the way micro-patch - to -base/bom works to make GMM generation succeed. |
Hmmmh. Actually. Looking at generated
I am not sure things work any better with "bom" of |
Ok. But would the fix not be as simple as using this:
i.e. replace Will propose a patch against 2.13 soon. |
@jjohannes I published |
@cowtowncoder thanks I tested it (see comment on the other issue) and it works! And yes If you ever want to test something manually yourself. You can do:
You can look at the dependencies tree printed to console or open the Build Scan Link and explore the results in the browser. |
@jjohannes Thank you for the quick response & all help here, as well as obviously adding GMM support in the first place. I think I'll need to attach your test procedure somewhere as documentation, thanks! |
* Revert "Bump jackson-databind only to 2.13.2.1 (#1824)" This reverts commit 5e87cf8. * overwrite only one deps. Thanks to FasterXML/jackson-bom#52
One final twist: after thinking it through, I decide to actually publish |
@cowtowncoder just to confirm - on upgrading |
@jpcmonster Not quite sure what you mean about downgrade, but yes, |
I think what they meant is, https://mvnrepository.com/artifact/com.fasterxml.jackson/jackson-bom/2.13.2.20220328 - which is from march, 29th, has a dependency to |
thx @dewa-actico - yes, that's what I meant. Sorry if that was unclear; SpringBoot 2.6.7 makes this exact change to their |
Ok, right. Semantically, I would NOT consider Once we release |
@cowtowncoder This is broken again with the latest micro patch release Edit: Build logs show
|
@five-iron Yes, I did not backport fix in 2.13 branch, unfortunately. Adding it in now won't help with micro-patch although I should probably do it just in case. |
@ahattz11 That is unfortunately wrong thing to do: I never intend to release So please upgrade to the new bom released today -- or, if you don't use bom, |
FWIW I had no apparent issues with Gradle |
@chadlwilson That sounds plausible. There is a real problem, but it sounds like it will affect a subset of Gradle users: perhaps it requires direct "implementation" dependency to |
I have been battling problems with failing Gradle builds all week related to these problems... every time I try to fix something, the problems seem to multiply. Just for summary, can someone please tell me the latest stable version(s) of Jackson and friends. I am using Gradle 7.5.1 |
@kolotyluk See #52 (comment) - still the latest at time of writing. Or can explore via https://mvnrepository.com/artifact/com.fasterxml.jackson/jackson-bom |
@kolotyluk There is only one problematic All other boms should be fine. I am not sure what are issues you have since your description had very little information to go about. If you have issues with other boms please explain what specifically you have tried to do. |
So, it turns out the problem I had was caused by org.apache.spark:spark-core_2.13:3.3.1 which references com.fasterxml.jackson:jackson-bom:2.13.4.1 and causes all sorts of havoc... Switching to version 3.3.0 corrects the problem. |
@kolotyluk Ah. Yes, micro-patches are... seemingly hard to explain. But the idea is that only 3-part versions like Not sure why |
I think the problem there is that spark-core The problem there can be resolved without rolling back spark by
|
@chadlwilson Ok that makes sense, yes. It'd be good if they used |
See this issue for reference: FasterXML/jackson-databind#3428
I think the cause of this is due to the configuration of gradle-module-metadata-maven-plugin in jackson-base pom.xml:
${project.version}
only works if the jackson-bom version matches the downstream project. E.g., if jackson-databind is at version 2.13.2.1 while jackson-bom is actually at 2.13.2.20220324, gradle will mistakenly report the jackson-bom dependency as 2.13.2.1, which there is no version for, and so it fails.I'm not sure the best solution, but maybe this needs to be hardcoded to the same version as jackson-bom above, and changed with each release/snapshot cycle? Or maybe a variable or something in this file.
The text was updated successfully, but these errors were encountered: