Workiva / Workiva/over_react_codemod
Dart 2.18.7 issue with pub
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 3
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
If you run a codemod and haven't performed a pub-get beforehand, the codemod will attempt to pub-get. By default, we can no longer run 'pub get' and instead must run 'dart pub get'. (Or setup an alias)
Running the codemod in this instance produces this error:
dustinpauze@WF17853 wdesk_sdk % dart pub global run over_react_codemod:intl_message_migration
Building package executable...
Built over_react_codemod:intl_message_migration.
[WARNING] codemod found no files
[WARNING] orcm.logging: ^ Ignore the "codemod found no files" warning above for now.
^ Ignore the "codemod found no files" warning above for now.
[INFO] orcm.intl_message_migration: Running `pub get` if needed so that all Dart files can be resolved...
Running `pub get` if needed so that all Dart files can be resolved...
[INFO] orcm.pubspec: Running `pub get` in `/Users/dustinpauze/Workiva/wdesk_sdk`...
Running `pub get` in `/Users/dustinpauze/Workiva/wdesk_sdk`...
No preset version installed for command pub
Please install a version by running one of the following:
asdf install dart 2.18.7
or add one of the following versions in your config file at /Users/dustinpauze/.tool-versions
dart 2.13.4
Unhandled exception:
Exception: pub get failed with exit code: 126
#0 runPubGet (package:over_react_codemod/src/util/package_util.dart:76:5)
<asynchronous suspension>
#1 runPubGetIfNeeded (package:over_react_codemod/src/util/package_util.dart:43:5)
<asynchronous suspension>
#2 pubGetForAllPackageRoots (package:over_react_codemod/src/executables/intl_message_migration.dart:324:5)
<asynchronous suspension>
#3 main (package:over_react_codemod/src/executables/intl_message_migration.dart:171:3)
<asynchronous suspension>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package:over_react_codemod/src/util/package_util.dart at runPubGet, then trace its callers in src/executables/intl_message_migration.dart. Reproduce the codemod without a prior dependency fetch; done means the dependency step uses the Dart-compatible command and completes instead of failing with exit code 126.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100