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.
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
INTL-1608 : Activate _over_react_codemod executables separately #246
INTL-1608 : Activate _over_react_codemod executables separately #246
Changes from 4 commits
ab5caff
7545149
019793f
64e7196
328ec1b
1179a5e
31260e6
ed3a292
98121b8
79287b8
8a7de4e
cf5802c
413a24d
0562166
fb167e9
b2876e7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There are two cases we have to consider for this. The first is when we have a normal repo with a single package that has a file lib/src/intl/packagename_intl.dart in it. For example,
wdesk
. This executable works for that. But the reason it works is that this code finds every Dart file underneath /lib and finds a single package root which is the root of the repo. But in that case, finding the package root is not really necessary, because it's the known root of the repo.The more complicated case is when a repo has multiple subpackages, for example ml_ui_client. In that case finding the package roots would be useful, but this doesn't do it properly because it only looks for files underneath /lib. There is no top-level lib directory in ml_ui_client, so it doesn't find anything and throws an exception.
Could not find package root for file /Users/alanknight/dart/ml_ui_client/lib
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.
So there are two directions this could go.
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.
@alanknight-wk I have updated the code
pubspec.yaml
create the following methodpubspec.yaml
this shows an errorcould not determine the package name but under
ml_ui_client
directory it works .pubspec.yaml
on root it not shows error but sorting not working because intl.dart files are undersubpackage/package/lib/src
eg:subpackage/datatables/lib/src
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.
The logger info doesn't actually print anything. I would just turn this into a print statement.
And change the text to something like
Sorting and formatting INTL files for $packageName
.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.
Delete this method.
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.
Delete this method.
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.
This method is for running migration with only
--no-migrate
argsThere 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.
Yes, and I'm saying we shouldn't run migrators at all.
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.
Delete this method.
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.
Delete this method.
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.
Delete this method.