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

Separate Flutter engine & Dart engine cache and pub caches #241

Closed
ilovelinux opened this issue Aug 20, 2023 · 2 comments
Closed

Separate Flutter engine & Dart engine cache and pub caches #241

ilovelinux opened this issue Aug 20, 2023 · 2 comments

Comments

@ilovelinux
Copy link

ilovelinux commented Aug 20, 2023

It could be useful to separate Flutter engine & Dart engine cache and pub and allow to invalidate pub caches as needed.

Actual behavior

  1. First run with caching.
    Cache generated: flutter/*
  2. Second run, retrieving caches, adding/replacing/updating dependencies.
    The cache has not been updated since it already exists and the update has not been enforced.
  3. Third run, no edits.
    Needs to download added/replaced/updated dependencies again since the pub cache hasn't been updated.

Expected behavior

  1. First run with caching.
    Two caches were generated: flutter/!.pub-cache with all except .pub-cache folder, and flutter/.pub-cache
    Optionally, we could allow users to define a custom key for pub caches as we do with cache-key input.
  2. Second run, retrieving caches and adding/replacing/updating dependencies.
    Enforce pub cache update. If the custom key uses ${{ hashFiles('pubspec.lock') }}, create a new minimal (smaller, without older dependencies) cache.
  3. Third run, no edits.
    The cache is valid and ready to use. No need to download new dependencies again.
@bramp
Copy link

bramp commented Feb 29, 2024

This may be fixed by #265

@subosito
Copy link
Owner

subosito commented Mar 1, 2024

Yes, you're correct @bramp. I just updated the v2 and released v2.13.0 for this. Please try @ilovelinux

@subosito subosito closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants