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

YamlParser fails print idempotency for values containing :@a@ #3804

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Laurens-W
Copy link
Contributor

What's changed?

Added a testcase for a short piece of yaml that should be parsed correctly (Spring Boot correctly interprets this)

What's your motivation?

Ran into an issue where the application.yaml isn't parsed because of a file reference that uses @project.basedir@

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

Is this valid yaml?

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

Referring to the file as a classpath resource works like a charm

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

@Laurens-W Laurens-W changed the title Add testcase File reference using @project.basedir@ is unparsable Dec 11, 2023
@timtebeek timtebeek added bug Something isn't working parser-yaml labels Dec 11, 2023
@timtebeek
Copy link
Contributor

Still fails with these two failures on that last two tests added.

diff --git a/file.yaml b/file.yaml
index 9e749ca..3812502 100644
--- a/file.yaml
+++ b/file.yaml
@@ -1 +1 @@ 
-a: b:@c@d
\ No newline at end of file
+a: b:f73fe741-95d9-479a-9829-235836e2a6e2
\ No newline at end of file
diff --git a/file.yaml b/file.yaml
index 649c05f..47d68eb 100644
--- a/file.yaml
+++ b/file.yaml
@@ -1 +1 @@ 
-a: 'b:@c@d'
\ No newline at end of file
+a: 'b:3002553c-c619-48c3-a1b6-c2d70f833700d'
\ No newline at end of file

@timtebeek timtebeek changed the title File reference using @project.basedir@ is unparsable YamlParser fails print idempotency for values containing :@a@ Aug 16, 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 parser-yaml
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants