3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-07-17 20:05:45 +00:00

use rollup to do bundle splitting

this uses dynamic imports for the cache provider and should thus solve the
deprecated import error when using warpbuild
This commit is contained in:
Arpad Borsos 2026-06-06 14:35:16 +02:00
parent 1fe0a60026
commit c106961fee
No known key found for this signature in database
GPG key ID: FC7BCA77824B3298
10 changed files with 333200 additions and 665905 deletions

View file

@ -12,7 +12,7 @@ process.on("uncaughtException", (e) => {
});
async function run() {
const cacheProvider = getCacheProvider();
const cacheProvider = await getCacheProvider();
if (!cacheProvider.cache.isFeatureAvailable()) {
setCacheHitOutput(false);
@ -42,9 +42,10 @@ async function run() {
lookupOnly,
});
if (restoreKey) {
const match = restoreKey.localeCompare(key, undefined, {
sensitivity: "accent"
}) === 0;
const match =
restoreKey.localeCompare(key, undefined, {
sensitivity: "accent",
}) === 0;
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
if (!match) {
// pre-clean the target directory on cache mismatch