Closed felix-barz-brickmakers closed 1 month ago
I encountered the same issue with custom_lint: 0.6.5, and the problem was only resolved after downgrading to version 0.6.4.
For me, I ran flutter clean
and that fixed it, for now. It'll probably break next time I build the app, but it works in CI at least.
Describe the bug When trying to run custom_lint on a more complex flutter project, it fails with
Failed to decode .dart_tool/package_config.json
on unrelated files. This happens for:package_info_plus
Failed to decode .dart_tool/package_config.json at .../ios/.symlinks/plugins/package_info_plus. Make sure to run pub get first.
flutter_localizations
Failed to decode .dart_tool/package_config.json at .../.dart_tool/flutter_gen. Make sure to run pub get first.
The error is the same in all cases (with different paths):
To Reproduce (Example project: test_project.zip)
flutter create -e test_project
flutter pub add package_info_plus 'flutter_localizations:{"sdk":"flutter"}' dev:custom_lint
custom_lint
andflutter_localizations
flutter build ios --debug --no-codesign
(To create the.symlinks
directory)custom_lint
Expected behavior The tool should run without any errors.
Workaround For now, the only workaround seems to be to delete the
ios/.symlinks
and.dart_tool/flutter_gen
directories prior to executingdart run custom_lint
.