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

Modify backwards compatibility script to ignore synthetic access methods #1330

Merged
merged 2 commits into from
May 20, 2024

Conversation

vincentvilo-aws
Copy link
Contributor

Issue #, if available: N/A

Description of changes: Modify backwards compatibility script to ignore synthetic access methods. These access methods are not public and should not affect backwards compatibility.

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

@@ -82,6 +82,9 @@ find_removed_methods() {

local removed_methods=$(diff <(echo "$LATEST_METHODS") <(echo "$CURRENT_METHODS") | grep '^<')

# ignore synthetic access methods - these are not available to users and will not break backwards compatibility
removed_methods=$(echo "$removed_methods" | grep -v "access\$[1-4]00")
Copy link
Contributor

Choose a reason for hiding this comment

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

IS there a reason we set this and then immdediately change it again. Could we do this in one line?

Also if you can provide why that grep works well that would be great. I don't have an intuition for this line: grep -v "access$[1-4]00"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Main reason as to why it's on its own line is just to make it explicit that we are ignoring these types of errors. We can include it in the same line but imo I think it's better to keep it separate and make it clear we're ignoring synthetic methods with the following line.

What grep -v <...> does is filter out any lines that contain the specified pattern. If we find that access$100, access$200, access$300, or access$400 is in the original diff output, we remove the line from the output (i.e. we ignore any changes related to access$[1-4]00).

FYI the newest commit changes this to ignore access$000 to access$900.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, it's not super intuitive to me but if it is standard and doesn't need a comment that is ok

@vincentvilo-aws vincentvilo-aws merged commit 023f6be into awslabs:master May 20, 2024
2 checks passed
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.

2 participants