fix: use cache dir for sol programs loading#52
Merged
Conversation
gustavogama-cll
approved these changes
May 11, 2026
ecPablo
pushed a commit
that referenced
this pull request
May 18, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](v0.3.0...v0.4.0) (2026-05-18) ### Features * add changeset and operation to delete CRE workflow ([#54](#54)) ([f0e341a](f0e341a)) * add support for multiple api key to deploy workflow ([#55](#55)) ([a68f156](a68f156)) * transfer native ([#56](#56)) ([4368e49](4368e49)) ### Bug Fixes * use cache dir for sol programs loading ([#52](#52)) ([b04f4d9](b04f4d9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: app-token-issuer-ops-platform[bot] <275822481+app-token-issuer-ops-platform[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous implementations had issues in CI if the caller was in a folder with no write permissions. Now we use the os cache dir to make it safer for CI environments.
AI Summary
This pull request refactors how the Solana test utilities determine the cache directory for program artifacts, making the cache location more robust and ensuring it is always writable. It also adds a unit test to verify the new cache directory logic.
Refactor cache directory logic:
programsCachePathfunction with a newprogramsCacheDirfunction that uses the user's OS cache directory (or temp directory as fallback) for storing cached.sofiles, ensuring the path is always writable and avoids usingpkg/modwhen loaded as a Go module.downloadChainlinkCCIPProgramArtifactsto use the newprogramsCacheDirfunction.Testing improvements:
TestProgramsCacheDir, to verify that the cache directory is absolute, ends with the expected path, and does not includepkg/mod.