-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Eclipse having issues duemodule-info
class "lost" on 2.18.0 jars
#4727
Comments
Can you give more details? The issue is in jackson-databind 2.18.0 jar and only that jar? I downloaded jackson-databind 2.18.0 jar and it has:
|
compile with maven 3.9.5 (and newer) with jdk21 works (openjdk and temurin) eclipse does not seem to be able to handle the multi version jar which it can with 2.17.2. tested with eclipse 2024-03 and 2024-09 there is a similar issue on eclipse.jdt.core for gson |
That is 100% an eclipse problem, Also found animal sniffer doesn't like compiles into alternative versions, e.g. jdk11 compiling into versions/17 , throws a java error - |
jackson-core is a Multi-Release jar - not jackson-databind I agree with @GedMarc that this does not appear to be an issue in jackson-core/jackson-databind and that issue is in tooling that users are using. @bwzhang2011 provided very little detail on what their issue is. |
Not sure if this might be related to a jackson-core fixed issue FasterXML/jackson-core#1340. Either way description is too incomplete to be actionable; closing. May be re-opened or re-filed with more information; in particular showing how to reproduce the issue. EDIT: as per @GedMarc that issue appears unrelated to whatever issue was here. |
This is a moditect issue moditect/moditect#254 Which unfortunately makes it a jackson issue, because you should either downgrade or upgrade as soon as the issue for moditect is fixed. |
moditect/moditect@5d63f7b seems to be in every release since 1.2.0.Final so maybe the best course of action is to downgrade to moditect 1.1.0 in all Jackson repos - 2.18 branches. https://mvnrepository.com/artifact/org.moditect/moditect/1.1.0 |
@AndreasWBartels Thanks for the analysis. Moditect is a pretty widely used tool and the commit that you highlight appears to have been in 3 releases of Moditect in the last 6 months. The internet is not ablaze with people complaining about broken jars. My vote would be to use an old version of Moditect until a fix is made - but that there is no reason to rush out a Jackson release. Users can stick to older Jackson releases if they think they might be affected by this. |
Uggggh. Moditect downgrade is tricky since if I recall it comes via parent poms. And verification of newer versions, once available, seems difficult. But if we have to, we have to. |
I'll update the jdk11 compat test to 2.18, should be able to add a test case there, |
Ok. So, if I understand this correctly, the problem reported as moditect/moditect#254 ONLY affects If so, I think the safest patch would be to override plugin version just for Does this make sense? My concern with But most importantly: is the issue -- as far as we understand it -- limited to |
The problem affects all modules that only add module-info.java, i.e. jackson-databind, jackson-databind-jsr310. jackson-core adds classes for different versions, which indirectly solves the problem. $ less jackson-core/2.18.0/jackson-core-2.18.0.jar
$ less jackson-databind/2.18.0/jackson-databind-2.18.0.jar
|
@AndreasWBartels ahhhhh. Ok, so the reverse of what I thought. This is... unfortunate to say the least. In that case, need to consider placement. |
The real fix here is to get Eclipse to fix JDT. |
I agree wrt @pjfanning 's comment. But in the meantime maybe FasterXML/oss-parent#179 is worth considering. |
@cowtowncoder why dou you agree the suggestion from @pjfanning, solve the compatibility should be first choice other than adjure eclipse to be adjust to the change between different version of jackson release. and of source it does appear in eclipse enviroment when your project relates to the module-info. so how can I solve it without major modification or wait for next release of jackson ? |
@bwzhang2011 dozens of jars are published with moditect. Since moditect made its change, lots of them have uptaken the change. The Java command is happy with the jars we publish. |
@bwzhang2011 Note that the First != Best -- I think Eclipse fixing tooling would be the BEST fix (assuming I understand the issue correctly). It might not be the FIRST thing we do -- we may well need to use a work-around like downgrade. |
Ok: so, Moditect plugin version is downgraded to 1.1.0 for Jackson 2.18 branch, and I verified that resulting jar/bundle now has intermediate directory entries. but I'll mark this as fixed in release notes as well. Changes will be seen in 2.18.1 release. I hope there will be a new Moditect release at some point so we can upgrade to the latest, but for now I hope this does the trick. |
module-info
class lost during 2.18 version on Eclipse
module-info
class lost during 2.18 version on Eclipsemodule-info
class "lost" on 2.18.0 jars
Describe the bug
module info lost during the release since jackson-databind 2.18.0 version while correct in early version released like 2.17.2. notice that 2.17.2 is correct for databind core and annotation package. I recommend new deployed version to be released which could help the upgration of jacskon
Version Information
2.18.0
Reproduction
Not given
Expected behavior
no error while import module class support
Additional context
None
The text was updated successfully, but these errors were encountered: