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

Package Command Should Preserve Map Key Order #369

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

null93
Copy link
Collaborator

@null93 null93 commented Apr 16, 2024

Issue #, if available:

Fixes #362

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ericzbeard
Copy link
Contributor

ericzbeard commented Apr 16, 2024

Looks like this change broke anchors. Maybe we need to look for another way to support anchors, since the Decode/Encode was an expedient solution that had unwanted side effects (like losing line numbers).

@null93
Copy link
Collaborator Author

null93 commented Apr 16, 2024

Didn't see that coming lol. I can take another look later to see what I can come up with.

@null93
Copy link
Collaborator Author

null93 commented Apr 17, 2024

@ericzbeard

I think I got it to work. I had to modify the test file as well since order needed to be reflected in the expected result (and style).

I added a visitor package under cft and used it to manually resolve the alias nodes. I still had to Marshal and Unmarshal the result so line/column numbers get updated on the anchored nodes.

Let me know if anything needs changing.

@ericzbeard ericzbeard merged commit 46f7e05 into aws-cloudformation:main Apr 17, 2024
1 check passed
@null93
Copy link
Collaborator Author

null93 commented Apr 17, 2024

@ericzbeard Thanks for merging this PR in! Does this project release on a certain schedule? I am just wondering when the next release will be with this fix implemented.

@null93
Copy link
Collaborator Author

null93 commented May 2, 2024

@ericzbeard ^^ Any idea when the next release will be? 😃

@ericzbeard
Copy link
Contributor

I'll get one out today or tomorrow. No schedule, just whenever there are features and fixes ready to go out.

@ericzbeard
Copy link
Contributor

https://github.com/aws-cloudformation/rain/releases/tag/v1.8.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Unsorted Flag For Package Command
2 participants