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

Use actual newline (instead of "\n") to split strings in yq rule #464

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Use actual newline (instead of "\n") to split strings in yq rule #464

merged 1 commit into from
Jun 23, 2023

Conversation

malt3
Copy link
Contributor

@malt3 malt3 commented Jun 22, 2023

Fixes d79f4d4
Fixes #463

This is required since versions of yq older than 4.30.3 do not parse "\n" correctly. See mikefarah/yq#1430 and mikefarah/yq@e02bb71


Type of change

  • Bug fix (change which fixes an issue)

Test plan

  • Manual testing; please provide instructions so we can reproduce:
  1. Build any yq rule: bazel build //lib/tests/yq:stamped
  2. Look at the processed stamping yaml: cat bazel-bin/lib/tests/yq/_stamped_stamp.yaml

Without this fix, the file only contains the first item of bazel-out/stable-status.txt and bazel-out/volatile-status.txt respectively. With the fix, every item appears in the yaml.

Fixes d79f4d4
Fixes #463

This is required since versions of yq older than 4.30.3 do not parse "\n" correctly.
See mikefarah/yq#1430 and e02bb7194897edb916a6787fb8f8e5a7f432dd94
Copy link

@opicaud opicaud left a comment

Choose a reason for hiding this comment

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

Confirmed that the provided red test is now fully green with this change

@alexeagle
Copy link
Collaborator

Wow that was silly. I was debugging this to fix it myself, and stumbled on this thread without realizing it's a PR on bazel-lib :)

@alexeagle alexeagle merged commit 794df71 into bazel-contrib:main Jun 23, 2023
@malt3 malt3 deleted the fix/yq-split-newline-old-version branch June 23, 2023 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants