Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base ensureUptodate on .dart_tool/package_config.json #4153

Closed
sigurdm opened this issue Feb 27, 2024 · 0 comments · Fixed by #4160
Closed

Base ensureUptodate on .dart_tool/package_config.json #4153

sigurdm opened this issue Feb 27, 2024 · 0 comments · Fixed by #4160
Labels
type-enhancement A request for a change that isn't a bug

Comments

@sigurdm
Copy link
Contributor

sigurdm commented Feb 27, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant