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

Instead of throwing most MavenDownloadingException, record them into … #4140

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

sambsnyd
Copy link
Member

…the resolution result. This allows for partial success when processing poms which are invalid or contain unresolvable dependencies without hiding the existence of these problems.

What's changed?

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

…the resolution result. This allows for partial success when processing poms which are invalid or contain unresolvable dependencies without hiding the existence of these problems.
@@ -66,6 +66,12 @@ public class RawPom {
@Nullable
String version;

// This is an obsolete field that is no longer used, but it is present in some particularly old POMs
@EqualsAndHashCode.Include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it should be included in EqualsAndHashCode

}

@JsonCreator
ResolvedPom(Pom requested, Iterable<String> activeProfiles, Map<String, String> properties, List<ResolvedManagedDependency> dependencyManagement, @Nullable List<MavenRepository> initialRepositories, List<MavenRepository> repositories, List<Dependency> requestedDependencies, List<Plugin> plugins, List<Plugin> pluginManagement) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worries me. Where is the constructor going?

Copy link
Member Author

@sambsnyd sambsnyd Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this PR there are no remaining invocations of the two-argument form of the constructor within OpenRewrite.
So if the two-argument constructor is gone the remaining constructor is exactly what lombok would generate, so there is no need to preserve it explicitly.

@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Ready to Review
Development

Successfully merging this pull request may close these issues.

None yet

4 participants