зеркало из https://github.com/microsoft/lage.git
updated with glob-hashing (#747)
* updated with glob-hashing * fixing the hash calculation to filter out null * Change files
This commit is contained in:
Родитель
552118e5af
Коммит
1e36de04ab
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fixing hashing issues related to rust panic",
|
||||
"packageName": "@lage-run/cache",
|
||||
"email": "kchau@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fixing hashing issues related to rust panic",
|
||||
"packageName": "@lage-run/hasher",
|
||||
"email": "kchau@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fixing hashing issues related to rust panic",
|
||||
"packageName": "lage",
|
||||
"email": "kchau@microsoft.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
"backfill-cache": "5.7.1",
|
||||
"backfill-config": "6.4.1",
|
||||
"backfill-logger": "5.2.1",
|
||||
"glob-hasher": "^1.3.0"
|
||||
"glob-hasher": "^1.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lage-run/monorepo-fixture": "*",
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
"@lage-run/target-graph": "^0.8.9",
|
||||
"@lage-run/scheduler-types": "^0.3.13",
|
||||
"execa": "5.1.1",
|
||||
"glob-hasher": "^1.3.0"
|
||||
"glob-hasher": "^1.4.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"@lage-run/logger": "^1.3.0",
|
||||
"execa": "5.1.1",
|
||||
"workspace-tools": "0.36.4",
|
||||
"glob-hasher": "^1.3.0",
|
||||
"glob-hasher": "^1.4.2",
|
||||
"graceful-fs": "4.2.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -111,9 +111,9 @@ export class FileHasher {
|
|||
this.#store[file] = {
|
||||
mtime: stat.mtimeMs,
|
||||
size: Number(stat.size),
|
||||
hash,
|
||||
hash: hash ?? "",
|
||||
};
|
||||
hashes[file] = hash;
|
||||
hashes[file] = hash ?? "";
|
||||
}
|
||||
|
||||
return hashes;
|
||||
|
|
|
@ -58,6 +58,7 @@ export class PackageTree {
|
|||
"git",
|
||||
[
|
||||
"ls-files",
|
||||
"-z",
|
||||
"-o",
|
||||
"--exclude-standard",
|
||||
...patterns.filter((p) => !p.startsWith("!")),
|
||||
|
|
|
@ -200,7 +200,7 @@ export class TargetHasher {
|
|||
|
||||
const fileFashes = hash(files, { cwd: root }) ?? {};
|
||||
|
||||
const hashes = Object.values(fileFashes);
|
||||
const hashes = Object.values(fileFashes).filter((hash) => hash !== undefined && hash !== null) as string[];
|
||||
|
||||
return hashStrings(hashes);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"dts-bundle": "dts-bundle-generator --config ./dts-bundle.config.js && node ./scripts/update-dts-bundle.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"glob-hasher": "^1.3.0"
|
||||
"glob-hasher": "^1.4.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
|
|
36
yarn.lock
36
yarn.lock
|
@ -2545,26 +2545,51 @@ glob-hasher-darwin-arm64@1.3.0:
|
|||
resolved "https://registry.yarnpkg.com/glob-hasher-darwin-arm64/-/glob-hasher-darwin-arm64-1.3.0.tgz#98dd31a7b08c3c9940a99ea391af405778065d79"
|
||||
integrity sha512-xJk+chXLeVBamYQ2fo1Plk0uqoUkv42o7PYZBVr7lSy9eoBAqXKCcf23godpA1BoUfz2cWpvzhI0Nl+MQsJX6g==
|
||||
|
||||
glob-hasher-darwin-arm64@1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-darwin-arm64/-/glob-hasher-darwin-arm64-1.4.2.tgz#0b5468cd43a57dbcaf46c20d2c6a35065e7d2762"
|
||||
integrity sha512-zqCZDkDrgo86UsEbOV5wnfyAVlNQ85clGt9EV4LlskDmv2aeuHD6dFYU8hLbbQSC7nvd90EWewy1WqvV6KsL7A==
|
||||
|
||||
glob-hasher-darwin-x64@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-darwin-x64/-/glob-hasher-darwin-x64-1.3.0.tgz#dd0f3723f41e69dd851de3be145f8c1e132b8ea9"
|
||||
integrity sha512-RpXjO136MYGi+GyQgYgDqsBmyrLUhSJTwsEZx8mhF/3JcH5/RW/RVhr9PSB9Mt/FU1MH099Ln03G+u3OEDK46g==
|
||||
|
||||
glob-hasher-darwin-x64@1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-darwin-x64/-/glob-hasher-darwin-x64-1.4.2.tgz#4dc3a46bd00f6959065f1c104fb4459d2160ae4d"
|
||||
integrity sha512-yEmIQyr6pGj2RG6IxUpOiVbbTm+lw5+L6MqxdPJvp+Z96YSUIo7aOkru0M8lgFGTRh5fQNDWdoHM6kgK8USYrA==
|
||||
|
||||
glob-hasher-linux-x64-gnu@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-linux-x64-gnu/-/glob-hasher-linux-x64-gnu-1.3.0.tgz#cc3b94deb935f92aee980507daec3d4eef12a0f1"
|
||||
integrity sha512-B8woNLpg+JEdyD9Lfqvmm0rWDn2aYrh04SthIw2i1hdXwBm53JgsNIcdMnkhW9ZZtRI8LH5uTcQgPmC46lCE4w==
|
||||
|
||||
glob-hasher-linux-x64-gnu@1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-linux-x64-gnu/-/glob-hasher-linux-x64-gnu-1.4.2.tgz#213a64c61a3e5b3c3a068220ce282818210536d4"
|
||||
integrity sha512-7TT8Wfkw41zwfvkbZJ3M3QqWR4bR9qLnbSzcMFHrOIpJjdnvKzCzrqfi470S8sPb6dyEVyS7s49eP5YB8cSy5A==
|
||||
|
||||
glob-hasher-win32-arm64-msvc@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-win32-arm64-msvc/-/glob-hasher-win32-arm64-msvc-1.3.0.tgz#eff90a37fb7a8372ce2d12315ee154341fecd7a9"
|
||||
integrity sha512-mndlrg8lgXoHjzZooHh5aBkS5vOKRzVYBQkNKhqXmeSK6uV4VPnDYE3I/G7ucyNJc1CcAjQ9YTktwXNJkshLVg==
|
||||
|
||||
glob-hasher-win32-arm64-msvc@1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-win32-arm64-msvc/-/glob-hasher-win32-arm64-msvc-1.4.2.tgz#fa4335ab7bcec77ac2175e288c4a079b5a18d1ed"
|
||||
integrity sha512-HyNotx1CF0/7ulND7CnbLoyuykGeMIARJRzJK36WlcgR+BqkSfcPJEbsbk7AsHhaBOtlUWAbEX9MDndcx8uguQ==
|
||||
|
||||
glob-hasher-win32-x64-msvc@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-win32-x64-msvc/-/glob-hasher-win32-x64-msvc-1.3.0.tgz#fa862a1c857cf3f5736fcc4c247d69fcf0e444b5"
|
||||
integrity sha512-Gs4y0ZX4bJzLA2F9zAafvUJEZEEYYEDREEhdec3KB+a3pPxxjlVtNgH0hVOgXfzv8WRqUdFIff7a1vyem+y2NQ==
|
||||
|
||||
glob-hasher-win32-x64-msvc@1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher-win32-x64-msvc/-/glob-hasher-win32-x64-msvc-1.4.2.tgz#17b36bcc7bc1d7dd7607665f635baceb59c83486"
|
||||
integrity sha512-6mKybe2NwFABUA7ZxiiXurD5RXDrrCWwGA53NasfnO4z+hvH5q4jG6YvVhavf6GdTapJi9WwfMHRKvoSQNUxeQ==
|
||||
|
||||
glob-hasher@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher/-/glob-hasher-1.3.0.tgz#f43cc931bd0c364b0db8d8f08ab357cf967899b7"
|
||||
|
@ -2576,6 +2601,17 @@ glob-hasher@^1.3.0:
|
|||
glob-hasher-win32-arm64-msvc "1.3.0"
|
||||
glob-hasher-win32-x64-msvc "1.3.0"
|
||||
|
||||
glob-hasher@^1.4.2:
|
||||
version "1.4.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-hasher/-/glob-hasher-1.4.2.tgz#ea36aae9cbe76c5add37bbb847be5f378448cc66"
|
||||
integrity sha512-wYeJvOixB9iAzNpY94AgK0JvOdOQ7g30U+PN0LGSH9u0Y0WC+jIwukjMZ1JZiSoNzUSyrvABZYCNhXpZEoJ/8Q==
|
||||
optionalDependencies:
|
||||
glob-hasher-darwin-arm64 "1.4.2"
|
||||
glob-hasher-darwin-x64 "1.4.2"
|
||||
glob-hasher-linux-x64-gnu "1.4.2"
|
||||
glob-hasher-win32-arm64-msvc "1.4.2"
|
||||
glob-hasher-win32-x64-msvc "1.4.2"
|
||||
|
||||
glob-parent@^5.1.2, glob-parent@~5.1.2:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||
|
|
Загрузка…
Ссылка в новой задаче