openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.03k stars 300 forks source link

Dependency of type yaml is ignored and not processed by the recipes #2520

Closed PiotrZlotowski closed 8 months ago

PiotrZlotowski commented 1 year ago

Hello,

I have a project with following dependency:

        <dependency>
            <groupId>com.myproject</groupId>
            <artifactId>api</artifactId>
            <version>${api.version}</version>
            <type>yaml</type>
        </dependency>

This depndency is of yaml type and it seems that openrewrite ignores such dependency and it doesn't perform any actions on them. I've tested it with the following recipes:

I've debugged the code of openrewrite and the problem is located there: https://github.com/openrewrite/rewrite/blob/5427bbdd10cf8d5673b710a924dae82b3d07bbcc/rewrite-maven/src/main/java/org/openrewrite/maven/tree/ResolvedPom.java#L533-L535 Basically, only dependencies of type jar and pom are allowed to be processed, the rest is ignored and not processed any further. Is there any particular reason for that?

In the past, there was a similar case with dependency of type pom. Ticket: https://github.com/openrewrite/rewrite/issues/1583

I'm looking forward for your feedback in that matter.

Thanks a lot for your support.

jkschneider commented 1 year ago

@PiotrZlotowski I've never come across the YAML type before. Super curious how this is used. Do you have a reference to a dependency somewhere that actually has this type?

timtebeek commented 8 months ago

Closing due to inactivity.