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

[flutter_migrate] Start command and executables #2735

Merged
merged 30 commits into from
Dec 27, 2022

Conversation

GaryQian
Copy link
Contributor

@GaryQian GaryQian commented Oct 26, 2022

The start command and executable framework to allow the commands to be called.

The migrate tool is considered usable after this PR.

The tests include E2E tests that mocks a full migration process and exercises all of the sub commands.

This is dependent on #2734

@GaryQian GaryQian changed the title [flutter_migrate] Start command [flutter_migrate] Start command and executables Dec 6, 2022
@GaryQian GaryQian marked this pull request as ready for review December 7, 2022 01:03
@@ -55,11 +55,8 @@ bool _skipped(String localPath, FileSystem fileSystem,
}
}
if (skippedPrefixes != null) {
final Iterable<String> canonicalizedSkippedPrefixes =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't canonicalize, as it attempts to convert to absolute paths and this interferes with prefixing.

Copy link
Member

Choose a reason for hiding this comment

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

would we be susceptible to differences in path separator or ASCII case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me try normalize(), maybe that's what we are looking for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think a combination of path separator conversion and the normalize() function should be safe

argParser.addOption(
'base-app-directory',
help:
'The directory containing the base reference app. This is used as the common ancestor in a 3 way merge. '
Copy link
Member

Choose a reason for hiding this comment

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

should we only show this in verbose mode?

Copy link
Member

Choose a reason for hiding this comment

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

or not at all? i don't imagine end users should be using this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The use case for this is for people migrating many projects at once. By providing the base and target app dirs, the tool will skip over the download of the sdk and flutter-creating the project steps, which can save a lot of time.

I think putting this under verbose makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

valueHelp: 'path',
);
argParser.addOption(
'target-app-directory',
Copy link
Member

Choose a reason for hiding this comment

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

ditto question

@reidbaker
Copy link
Contributor

Approved % open comments.

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

.cirrus.yml Outdated
@@ -256,7 +256,7 @@ task:
zone: us-central1-a
namespace: default
cpu: 4
memory: 12G
memory: 14G
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flutter migrate tests fail on android gradle build due to OOM

@GaryQian GaryQian added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 27, 2022
@auto-submit auto-submit bot merged commit e425eea into flutter:main Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: flutter_migrate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants