Skip to content

Chicken-and-egg problem with Dart 3.8 formatter, l10n, and shared analyzer configs #169485

Open
@lishaduck

Description

@lishaduck

When running flutter pub get with l10n, it'll generate the l10n files, which requires formatting them. Formatting now requires running flutter pub get first, so fails.

flutter pub get --enforce-lockfile
Generating synthetic localizations package failed with [1](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:1) error:

ProcessException: `dart format` failed with exit code 1

stdout:


stderr:
PathNotFoundException: Cannot open file, path = '/home/runner/.pub-cache/hosted/pub.dev/very_good_analysis-8.0.0-rc.1/lib/analysis_options.yaml' (OS Error: No such file or directory, errno = 2)
#0      _checkForErrorResponse (dart:io/common.dart:58:[9](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:10))
#1      _File.open.<anonymous closure> (dart:io/file_impl.dart:441:7)
<asynchronous suspension>
#2      _File.readAsBytes.<anonymous closure> (dart:io/file_impl.dart:648:24)
<asynchronous suspension>
#3      _File.readAsString (dart:io/file_impl.dart:715:18)
<asynchronous suspension>
#4      readAnalysisOptions (package:dart_style/src/analysis_options/analysis_options_file.dart:69:27)
<asynchronous suspension>
#5      readAnalysisOptions.optionsFromInclude (package:dart_style/src/analysis_options/analysis_options_file.dart:[10](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:11)5:12)
<asynchronous suspension>
#6      readAnalysisOptions (package:dart_style/src/analysis_options/analysis_options_file.dart:120:28)
<asynchronous suspension>
#7      ConfigCache._findFormatterOptions (package:dart_style/src/config_cache.dart:122:25)
<asynchronous suspension>
#8      ConfigCache.findPageWidth (package:dart_style/src/config_cache.dart:89:13)
<asynchronous suspension>
#9      _processFile (package:dart_style/src/io.dart:193:40)
<asynchronous suspension>
#10     formatPaths (package:dart_style/src/io.dart:123:12)
<asynchronous suspension>
#[11](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:12)     FormatCommand.run (package:dart_style/src/cli/format_command.dart:344:7)
<asynchronous suspension>
#[12](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:13)     CommandRunner.runCommand (package:args/command_runner.dart:212:[13](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:14))
<asynchronous suspension>
#13     DartdevRunner.runCommand (package:dartdev/dartdev.dart:247:18)
<asynchronous suspension>
#[14](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:15)     runDartdev (package:dartdev/dartdev.dart:47:16)
<asynchronous suspension>
#[15](https://github.com/PSDTools/app/actions/runs/15258018357/job/42910120960?pr=471#step:7:16)     main (file:///b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart:13:5)
<asynchronous suspension>


  Command: /opt/hostedtoolcache/flutter/stable-3.32.0-x64/bin/cache/dart-sdk/bin/dart /opt/hostedtoolcache/flutter/stable-3.32.0-x64/bin/cache/dart-sdk/bin/dart format /home/runner/work/app/app/lib/l10n/app_localizations_en.dart /home/runner/work/app/app/lib/l10n/app_localizations_es.dart /home/runner/work/app/app/lib/l10n/app_localizations.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions