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

Fix Snakeyaml #439

Merged
merged 1 commit into from
May 29, 2024
Merged

Fix Snakeyaml #439

merged 1 commit into from
May 29, 2024

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Apr 30, 2024

Move to 2.2, but cannot get past one error: seems Model is not imported in writer (in reader is)??

Help!

@cstamas cstamas self-assigned this Apr 30, 2024
@fridrich
Copy link

fridrich commented May 3, 2024

0001-Fix-fix-SnakeYaml.patch.gz
OK, I had a look and this is my finding: I took some of your changes from a8b7aac and I changed the model. It looks like you cannot make snakeyaml-writer and snakeyaml-extended-reader from the same model. Because the extended reader requires locationTracker parameter in the root element. But with this parameter, the AbstractJavaModelloGenerator::isTrackingSupport is true and the class Model will be not relevant (isRelevant == false) and it will not be returned by getClasses(objectModel) in SnakeYamlWriterGenerator.
With the changes it produces compilable code.

@fridrich
Copy link

fridrich commented May 3, 2024

Also I changed the org.apache.maven.model package to org.codehaus.modello.test.model, because maven has itself the org.apache.maven.model.Model class in the org.apache.maven:maven-model artifact and it is safer to not have two unrelated classes on the classpath with the same full qualified name.

@cstamas
Copy link
Member Author

cstamas commented May 3, 2024

Applied and yay! Thanks @fridrich a lot!

@slawekjaranowski
Copy link
Member

I hope it is fix for: #367 and suppresses #419

@cstamas cstamas marked this pull request as ready for review May 22, 2024 07:14
@cstamas cstamas merged commit 0db6ec9 into master May 29, 2024
20 checks passed
@cstamas cstamas deleted the fix-snakeyaml branch May 29, 2024 16:51
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

Successfully merging this pull request may close these issues.

None yet

3 participants