-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add initial support for java references for yaml #4698
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected this PR to only contain the SourceFileWithReferences
implementation in Yaml.Documents
and not a generic Reference.Provider
implementation. But possibly I have missed something here.
rewrite-java-test/src/test/java/org/openrewrite/java/ChangeTypeTest.java
Outdated
Show resolved
Hide resolved
rewrite-java/src/main/java/org/openrewrite/java/TypeMatcher.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlReference.java
Outdated
Show resolved
Hide resolved
I'd applied some light polish to the parallel PR in 713ced2 ; would be good to apply those same changes here as well, and resolve the conflicts. |
# Conflicts: # rewrite-java-test/src/test/java/org/openrewrite/java/ChangeTypeTest.java # rewrite-java/src/main/java/org/openrewrite/java/TypeMatcher.java
Yes, would be good to update this PR now that the dust has settled a bit regarding the rename refactoring. |
# Conflicts: # rewrite-java/src/main/java/org/openrewrite/java/PackageMatcher.java # rewrite-java/src/main/java/org/openrewrite/java/TypeMatcher.java
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/package-info.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/package-info.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/package-info.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few small comments.
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlReference.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlReference.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlReference.java
Outdated
Show resolved
Hide resolved
rewrite-yaml/src/main/java/org/openrewrite/yaml/trait/YamlReference.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this added! Any last concerns before we merge @knutwannheden ?
What's changed?
This adds initial support for generating references to java type from a Yaml fine in a similar fashion, and with similar limitations, as in:
What's your motivation?
Adding this feature allows existing recipes that support references to be applied to .properties files. For more details see:
Reference
to include.properties
and.yml
#4681Anything in particular you'd like reviewers to focus on?
The focus points are almost on to one with the previously referenced implementation of references to Java type in
.properties
files.Anyone you would like to review specifically?
@timtebeek @Laurens-W
Any additional context
Checklist