Skip to content

Base ensureUptodate on .dart_tool/package_config.json #4153

@sigurdm

Description

@sigurdm

Basic idea is to

  • stat package_config.json and pubspec.lock to check that package_config modifed timestamp is newer.
  • read package_config.json and for each package check that
    • pubspec.yaml of that package modified timestamp is older than pubspec.lock
    • (We can discuss if we need to check packages in the pub-cache. We could assume they are ok, but we might also want to chekc that they exist).
    • We might have to handle flutter_gen differently as I believe it doesn't have a pubspec.yaml (need to check that).

If timestamps are out of order - redo the resolution, otherwise assume it is good.

This will have a better behavior for workspaces where we otherwise have to parse pubspec.yamls to find all pubspec.yamls in the workspace (parsing yaml is slow, and we prefer to avoid it for the ensureUptodate fast-path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions