Skip to content

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
@cstamas cstamas deleted the fix-snakeyaml branch May 29, 2024 16:51
@slawekjaranowski slawekjaranowski added enhancement dependencies Pull requests that update a dependency file labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants