From fa01820a3b46185b6e37266c5c6a2777e04297a5 Mon Sep 17 00:00:00 2001 From: Florian Meriaux Date: Wed, 15 Jun 2022 08:10:31 +0200 Subject: [PATCH] add documentation notes --- dist/cleanup/index.js | 2 +- dist/setup/index.js | 2 +- src/cache.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 235d0c3..3f419ec 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -65449,8 +65449,8 @@ const supportedPackageManager = [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), getCoursierCachePath(), - //TODO: comment the reason of exclusions '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + // Avoid SNAPSHOT resolution problems by forcing the deletion of these files (due to ideological gaps in maven/ivy). '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] diff --git a/dist/setup/index.js b/dist/setup/index.js index 0703230..2bfd791 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100654,8 +100654,8 @@ const supportedPackageManager = [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), getCoursierCachePath(), - //TODO: comment the reason of exclusions '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + // Avoid SNAPSHOT resolution problems by forcing the deletion of these files (due to ideological gaps in maven/ivy). '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] diff --git a/src/cache.ts b/src/cache.ts index e73d078..4f920c0 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -39,7 +39,8 @@ const supportedPackageManager: PackageManager[] = [ join(os.homedir(), '.ivy2', 'cache'), join(os.homedir(), '.sbt'), getCoursierCachePath(), - //TODO: comment the reason of exclusions + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). '!' + join(os.homedir(), '.sbt', '*.lock'), '!' + join(os.homedir(), '**', 'ivydata-*.properties') ], @@ -84,8 +85,7 @@ export async function restore(id: string) { core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey); if (primaryKey.endsWith('-')) { throw new Error( - `No file in ${process.cwd()} matched to [${ - packageManager.pattern + `No file in ${process.cwd()} matched to [${packageManager.pattern }], make sure you have checked out the target repository` ); }