-
Notifications
You must be signed in to change notification settings - Fork 249
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
chore: fix aft version-bump
#5436
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 28 additions & 37 deletions
65
packages/aft/test/version_bump/data/snapshots/multi_package_update.diff
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Q: Can you provide context around the purpose of this flag? How is it set?
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.
aft defines components in the root pubspec.yaml. Below is an example of the "Amplify Flutter" component which includes all amplify packages intended for direct consumption in a Flutter app.
amplify-flutter/pubspec.yaml
Lines 69 to 82 in f825f86
By default, if a package has a minor/major bump, that bump should propagate to all other packages in the components. For example, if amplify_auth_cognito goes from 2.3.1 to 2.4.0, all packages in that component have to have their version bumped to 2.4.0.
Components can override the default behavior by specifying
propagate: "major" | "minor" | "all" | "none"
in the pubpsec.yaml file. The "Amplify Dart" component has this override. When amplify_auth_cognito_dart has a minor version bump, other packages in the group do not need to also be bumped.amplify-flutter/pubspec.yaml
Lines 83 to 90 in f825f86
The
component.propagate.propagateToComponent()
fn determines if a change needs to propagate based on the component config in the root pubpsec file and the version update.Prior to this PR, this fn accepted an optional
propagateToComponent
flag. I do not know what the intended purpose of this was, but it was preventing propagation from occurring more than 1 level deep. This is problematic. See the PR description for an example of an issue this caused.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.
Makes more sense now, thanks for providing those references!