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

latest 0.21-SNAPSHOT fails to compile sources that has @Generated annotation #208

Open
vegegoku opened this issue Nov 8, 2022 · 6 comments

Comments

@vegegoku
Copy link
Member

vegegoku commented Nov 8, 2022

Testing the the plugin version 0.21-SNAPSHOT result in a lot of errors while running j2cl:watch over sources that have the javax.annotation.Generated annotation

[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_.java:5: The import javax.annotation.Generated cannot be resolved
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_.java:10: Generated cannot be resolved to a type
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af.java:6: The import javax.annotation.Generated cannot be resolved
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af.java:10: Generated cannot be resolved to a type
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af_NA.java:6: The import javax.annotation.Generated cannot be resolved
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af_NA.java:10: Generated cannot be resolved to a type
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af_ZA.java:6: The import javax.annotation.Generated cannot be resolved
[ERROR] org.dominokit.i18n:gwt-cldr:1.0/transpiled_js: Error:CurrencyList_af_ZA.java:10: Generated cannot be resolved to a type

@niloc132
Copy link
Member

niloc132 commented Nov 8, 2022

It looks like it might be possible to add https://search.maven.org/artifact/javax.annotation/jsr250-api/1.0/jar as a dependency for your project instead of assuming that j2cl should add this class? In your case, the gwt-cldr project should list this jar as a dependency (and possibly its sources jar, so that j2cl can pick up the sources as well).

@tobias-hammerschmidt
Copy link

tobias-hammerschmidt commented Nov 3, 2023

I'm affected by this issue since I'm using the dominokit library within my project. Since the library hasn't been updated yet I can't update to version 0.21.0 of j2cl maven plugin. I tried to add a dependency to the jsr-250 api as well as its sources to my project but still the issue persists. Is there any workaround available?

@tobias-hammerschmidt
Copy link

@niloc132 I just tried to update to j2cl version 0.22.0 but this issue persists. Is there any workaround available or do I have to wait for an update of org.dominokit.i18n:gwt-cldr?

@niloc132
Copy link
Member

This isn't explicitly fixed by the j2cl-maven-plugin (at this time, though we could potentially patch it into our fork of j2cl itself...), but instead should be a dependency of the library that has generated code in it - so yes, that might be a new release of domino's gwt-cldr fork. @vegegoku what do you think?

@vegegoku
Copy link
Member Author

I agree, I can work on that.

@tobias-hammerschmidt
Copy link

I think the issue is closed with domino-jackson 1.0.2/gwt-cldr 1.0.1. I finally switched to j2cl-maven-plugin 0.22.0 and everything compiles flawlessly.

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

3 participants