fluttercommunity / fluttercommunity/import_sorter
PathNotFoundException: Cannot open file - pubspec.lock
- Dominant language
- Dart
- Stars
- 183
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
When using Pub workspaces for monorepos, pubspec.lock is not generated in packages.
So, the following handling is needed.
```dart
final pubspecLockFile = File('$currentPath/pubspec.lock');
if (pubspecLockFile.existsSync()) {
final pubspecLock = loadYaml(pubspecLockFile.readAsStringSync());
dependencies.addAll(pubspecLock['packages'].keys);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the repository for the code that reads pubspec.lock and builds the dependency list, then compare it with the handling shown in issue #85. Verify the behavior for a Pub workspace package without pubspec.lock, and consider a regression test if the existing test structure covers this path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100