Skip to content

flutter pub get fails at workspace root when an app package l10n.yaml uses untranslated-messages-file #12

@EchoEllet

Description

@EchoEllet

This is the same issue as flutter/flutter#174205. Duplicated to keep track of it on this repo and make it clear that running flutter pub get inside the kraft_launcher app package first is required before running flutter pub get at the workspace level.

Current workaround in CI:

# Workaround for localization generation issue (https://github.com/flutter/flutter/issues/174205):
# Running "flutter pub get" at the root workspace normally triggers:
#
# Generating synthetic localizations package failed with 1 error:
# PathNotFoundException: Cannot open file, path = 'l10n/untranslated.json'
# (OS Error: No such file or directory, errno = 2)
#
# This happens when the "untranslated-messages-file" is set in
# "kraft_launcher/l10n.yaml" and the root-level "flutter pub get" runs
# before the app-level package.
#
# To avoid this, we first run "flutter pub get" in the app package directory,
# then run it at the root workspace level.
run: (cd kraft_launcher && flutter pub get) && flutter pub get

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integration issues, workflows, or build pipeline problems.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions