Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Intent I previously implemented caching but had to partially [roll it back](https://github.com/posit-dev/positron/pull/4771/files) because I mistakenly tied the nested directories to the root lock files for `extensions` and `build`. My goal now is to correct this setup and restore caching for the nested directories. ### Approach I separated the `extensions` and "extensions nested" directories into distinct caches. For the nested caches, I’m using a hash generated from **all** the existing yarn.lock files in the nested directories. This ensures that if a single extension changes, the cache is updated accordingly. I applied the same approach to the `remote` directory and its nested extensions. For example: ```bash - name: Cache nested extensions id: cache-nested-extensions uses: actions/cache@v4 with: path: ./extensions/**/node_modules key: cache-nested-extensions-v2-${{ runner.os }}-${{ hashFiles('extensions/**/yarn.lock') }} ``` In this example, the cache key is built using the content of all `yarn.lock` files under `extensions/**/yarn.lock`. If there are separate `yarn.lock` files in the root extensions directory and in its subdirectories, each will be hashed independently, making the root and nested caches distinct from one another. ### QA Notes * I [temporarily modified a nested lock file](1ff4252) and confirmed the caching behaved as expected. <img width="910" alt="Screenshot 2024-10-07 at 1 21 25 PM" src="https://github.com/user-attachments/assets/cebd80ad-007d-49a0-9f0a-946a9d5c4d6c">
- Loading branch information