fix: use ES-Module memoizee fork

This commit is contained in:
Amin Yahyaabadi 2024-08-31 22:13:12 -07:00
parent 57e4019423
commit b17afb8e45
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
23 changed files with 94 additions and 169 deletions

View File

@ -1,17 +0,0 @@
{
"problemMatcher": [
{
"owner": "gcc",
"pattern": [
{
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}

View File

@ -1,17 +0,0 @@
{
"problemMatcher": [
{
"owner": "llvm",
"pattern": [
{
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "msvc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+>)?(\\S.*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "python",
"pattern": [
{
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
"file": 1,
"line": 2
},
{
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
"message": 2
}
]
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,17 +0,0 @@
{
"problemMatcher": [
{
"owner": "gcc",
"pattern": [
{
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}

View File

@ -1,17 +0,0 @@
{
"problemMatcher": [
{
"owner": "llvm",
"pattern": [
{
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "msvc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+>)?(\\S.*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"problemMatcher": [
{
"owner": "python",
"pattern": [
{
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
"file": 1,
"line": 2
},
{
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
"message": 2
}
]
}
]
}

View File

@ -208,6 +208,9 @@
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {
"@actions/http-client@2.2.3": "patches/@actions__http-client@2.2.3.patch" "@actions/http-client@2.2.3": "patches/@actions__http-client@2.2.3.patch"
},
"overrides": {
"memoizee": "https://github.com/aminya/memoizee#fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632"
} }
} }
} }

View File

@ -38,7 +38,7 @@ async function sourceRCInRc_(options: RcOptions) {
/** /**
* handles adding conditions to source rc file from .bashrc and .profile * handles adding conditions to source rc file from .bashrc and .profile
*/ */
export const sourceRCInRc = memoize(sourceRCInRc_, { promise: true }) export const sourceRCInRc = await memoize(sourceRCInRc_, { promise: true })
async function addRCHeader(options: RcOptions) { async function addRCHeader(options: RcOptions) {
// a variable that prevents source rc from being called from .bashrc and .profile // a variable that prevents source rc from being called from .bashrc and .profile

View File

@ -25,4 +25,4 @@ export async function initApt(apt: string) {
} }
/** Install gnupg and certificates (usually missing from docker containers) (memoized) */ /** Install gnupg and certificates (usually missing from docker containers) (memoized) */
export const initAptMemoized = memoize(initApt, { promise: true }) export const initAptMemoized = await memoize(initApt, { promise: true })

View File

@ -24,4 +24,4 @@ export function updateAptRepos(apt: string = getApt()) {
* Update the apt repositories (memoized) * Update the apt repositories (memoized)
* @param apt The apt command to use (optional) * @param apt The apt command to use (optional)
*/ */
export const updateAptReposMemoized = memoize(updateAptRepos) export const updateAptReposMemoized = await memoize(updateAptRepos)

View File

@ -4,6 +4,9 @@ settings:
autoInstallPeers: true autoInstallPeers: true
excludeLinksFromLockfile: false excludeLinksFromLockfile: false
overrides:
memoizee: https://github.com/aminya/memoizee#fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
patchedDependencies: patchedDependencies:
'@actions/http-client@2.2.3': '@actions/http-client@2.2.3':
hash: gqcf2jay7nqqezf3jni6mxu74u hash: gqcf2jay7nqqezf3jni6mxu74u
@ -161,8 +164,8 @@ importers:
specifier: ^3.3.0 specifier: ^3.3.0
version: 3.3.0 version: 3.3.0
memoizee: memoizee:
specifier: ^0.4.17 specifier: https://github.com/aminya/memoizee#fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
version: 0.4.17 version: https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
mkdirp: mkdirp:
specifier: ^3.0.1 specifier: ^3.0.1
version: 3.0.1 version: 3.0.1
@ -308,8 +311,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../exec-powershell version: link:../exec-powershell
memoizee: memoizee:
specifier: ^0.4.17 specifier: https://github.com/aminya/memoizee#fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
version: 0.4.17 version: https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
path-exists: path-exists:
specifier: ^5.0.0 specifier: ^5.0.0
version: 5.0.0 version: 5.0.0
@ -364,8 +367,8 @@ importers:
specifier: ^7.2.0 specifier: ^7.2.0
version: 7.2.0 version: 7.2.0
memoizee: memoizee:
specifier: ^0.4.17 specifier: https://github.com/aminya/memoizee#fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
version: 0.4.17 version: https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632
node-downloader-helper: node-downloader-helper:
specifier: 2.1.9 specifier: 2.1.9
version: 2.1.9 version: 2.1.9
@ -1900,6 +1903,9 @@ packages:
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
engines: {node: '>=6.5'} engines: {node: '>=6.5'}
abstract-object@3.0.0:
resolution: {integrity: sha512-Xo2mAfDWRQLX0HZtS1i88mIajTHt/NKG4gAhUXNENFuutporVYsgxr8GkrzUU066HMQlw1Y9poGRGy7tDM9SuQ==}
acorn-jsx@5.3.2: acorn-jsx@5.3.2:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies: peerDependencies:
@ -2473,6 +2479,10 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
hasBin: true hasBin: true
custom-ability@2.0.0:
resolution: {integrity: sha512-8B/42xRz7lVnbtdSFEPkr/jiU2Zg5uqU6GC2d63EsZFyJw2UA7Wrh2LKQUv0mN6vSINdZfiySE+pCVZRxGgYGQ==}
engines: {node: '>=12'}
d@1.0.2: d@1.0.2:
resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==}
engines: {node: '>=0.12'} engines: {node: '>=0.12'}
@ -3000,6 +3010,9 @@ packages:
resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
engines: {node: '>=6'} engines: {node: '>=6'}
events-ex@2.0.0:
resolution: {integrity: sha512-2pGsVdug1KCmsAF0YFRYM8UTQcCi5UcO8NkrRLKLbrxxUGoHvosNQKqpLlxktdUFYBnsTwLI8NsnYc+eo7v45A==}
events@3.3.0: events@3.3.0:
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'} engines: {node: '>=0.8.x'}
@ -3369,6 +3382,10 @@ packages:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
inherits-ex@2.1.0:
resolution: {integrity: sha512-lvIiDNc3vA/RjtYmXSNYaJU4z2JYijO90V0MDC63mDoCuwjGok67u1Cl6vN5xgYkY5m6sOzo3fCKRqSXLq00zA==}
engines: {node: '>=12'}
inherits@2.0.4: inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
@ -4036,6 +4053,10 @@ packages:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true hasBin: true
lru-cache@11.0.0:
resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==}
engines: {node: 20 || >=22}
lru-cache@5.1.1: lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
@ -4083,8 +4104,9 @@ packages:
meant@1.0.3: meant@1.0.3:
resolution: {integrity: sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw==} resolution: {integrity: sha512-88ZRGcNxAq4EH38cQ4D85PM57pikCwS8Z99EWHODxN7KBY+UuPiqzRTtZzS8KTXO/ywSWbdjjJST2Hly/EQxLw==}
memoizee@0.4.17: memoizee@https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632:
resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} resolution: {tarball: https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632}
version: 0.4.17
engines: {node: '>=0.12'} engines: {node: '>=0.12'}
memorystream@0.3.1: memorystream@0.3.1:
@ -4719,6 +4741,9 @@ packages:
sax@1.4.1: sax@1.4.1:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
secondary-cache@2.0.0:
resolution: {integrity: sha512-3kZjHSukBEhQsdZPXDVI+SZAk7H7FaVhtm7rWgO1FOoG59spDgk/LpnUWF4IdW0A41KjYULUG2kRYcUnbICRdA==}
semver@5.7.2: semver@5.7.2:
resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==}
hasBin: true hasBin: true
@ -5201,6 +5226,9 @@ packages:
unbzip2-stream@1.4.3: unbzip2-stream@1.4.3:
resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==}
underscore@1.13.7:
resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==}
undici-types@5.26.5: undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
@ -5238,6 +5266,10 @@ packages:
util-deprecate@1.0.2: util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
util-ex@2.0.0:
resolution: {integrity: sha512-CdVsXWgu5SIVsVTAQvQ7tT7pHJmKCsaPoid3+OkxyUSItTC/o4w4rq24A1zJHiljsyRnjfwAxAkj0uSz0wyCgQ==}
engines: {node: '>=8'}
util.types@0.0.2: util.types@0.0.2:
resolution: {integrity: sha512-BexVqJ5GnaSMuf3IP4xXOgD81VjbZcjHcnbpSe1C8jZp2Yu5wxAWQCoro/J8dYiY/lV2fijWjDsqtL/JD12IuA==} resolution: {integrity: sha512-BexVqJ5GnaSMuf3IP4xXOgD81VjbZcjHcnbpSe1C8jZp2Yu5wxAWQCoro/J8dYiY/lV2fijWjDsqtL/JD12IuA==}
@ -7131,6 +7163,13 @@ snapshots:
dependencies: dependencies:
event-target-shim: 5.0.1 event-target-shim: 5.0.1
abstract-object@3.0.0:
dependencies:
custom-ability: 2.0.0
events-ex: 2.0.0
inherits-ex: 2.1.0
util-ex: 2.0.0
acorn-jsx@5.3.2(acorn@8.12.1): acorn-jsx@5.3.2(acorn@8.12.1):
dependencies: dependencies:
acorn: 8.12.1 acorn: 8.12.1
@ -7887,6 +7926,11 @@ snapshots:
cssesc@3.0.0: {} cssesc@3.0.0: {}
custom-ability@2.0.0:
dependencies:
inherits-ex: 2.1.0
util-ex: 2.0.0
d@1.0.2: d@1.0.2:
dependencies: dependencies:
es5-ext: 0.10.64 es5-ext: 0.10.64
@ -8665,6 +8709,11 @@ snapshots:
event-target-shim@5.0.1: {} event-target-shim@5.0.1: {}
events-ex@2.0.0:
dependencies:
custom-ability: 2.0.0
util-ex: 2.0.0
events@3.3.0: {} events@3.3.0: {}
execa@5.1.1: execa@5.1.1:
@ -9073,6 +9122,8 @@ snapshots:
once: 1.4.0 once: 1.4.0
wrappy: 1.0.2 wrappy: 1.0.2
inherits-ex@2.1.0: {}
inherits@2.0.4: {} inherits@2.0.4: {}
ini@1.3.8: {} ini@1.3.8: {}
@ -9882,6 +9933,8 @@ snapshots:
dependencies: dependencies:
js-tokens: 4.0.0 js-tokens: 4.0.0
lru-cache@11.0.0: {}
lru-cache@5.1.1: lru-cache@5.1.1:
dependencies: dependencies:
yallist: 3.1.1 yallist: 3.1.1
@ -9945,16 +9998,20 @@ snapshots:
meant@1.0.3: {} meant@1.0.3: {}
memoizee@0.4.17: memoizee@https://codeload.github.com/aminya/memoizee/tar.gz/fa36fc6f8bf3c8d3160f4731826c9db5b7d5e632:
dependencies: dependencies:
d: 1.0.2 d: 1.0.2
es5-ext: 0.10.64 es5-ext: 0.10.64
es6-weak-map: 2.0.3 es6-weak-map: 2.0.3
event-emitter: 0.3.5 event-emitter: 0.3.5
is-promise: 2.2.2 is-promise: 2.2.2
lodash: 4.17.21
lru-cache: 11.0.0
lru-queue: 0.1.0 lru-queue: 0.1.0
next-tick: 1.1.0 next-tick: 1.1.0
secondary-cache: 2.0.0
timers-ext: 0.1.8 timers-ext: 0.1.8
underscore: 1.13.7
memorystream@0.3.1: {} memorystream@0.3.1: {}
@ -10654,6 +10711,13 @@ snapshots:
sax@1.4.1: {} sax@1.4.1: {}
secondary-cache@2.0.0:
dependencies:
abstract-object: 3.0.0
events-ex: 2.0.0
inherits-ex: 2.1.0
util-ex: 2.0.0
semver@5.7.2: {} semver@5.7.2: {}
semver@6.3.1: {} semver@6.3.1: {}
@ -11170,6 +11234,8 @@ snapshots:
buffer: 5.7.1 buffer: 5.7.1
through: 2.3.8 through: 2.3.8
underscore@1.13.7: {}
undici-types@5.26.5: undici-types@5.26.5:
optional: true optional: true
@ -11203,6 +11269,10 @@ snapshots:
util-deprecate@1.0.2: {} util-deprecate@1.0.2: {}
util-ex@2.0.0:
dependencies:
inherits-ex: 2.1.0
util.types@0.0.2: util.types@0.0.2:
dependencies: dependencies:
define-properties: 1.2.1 define-properties: 1.2.1

View File

@ -38,7 +38,7 @@ async function setupLLVMWithoutActivation_raw(version: string, setupDir: string,
return installationInfo return installationInfo
} }
const setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_raw, { promise: true }) const setupLLVMWithoutActivation = await memoize(setupLLVMWithoutActivation_raw, { promise: true })
/** /**
* Setup clang-format * Setup clang-format
@ -84,7 +84,7 @@ async function llvmBinaryDeps_raw(majorVersion: number) {
} }
} }
} }
const llvmBinaryDeps = memoize(llvmBinaryDeps_raw, { promise: true }) const llvmBinaryDeps = await memoize(llvmBinaryDeps_raw, { promise: true })
async function setupLLVMDeps_raw(arch: string) { async function setupLLVMDeps_raw(arch: string) {
if (process.platform === "linux") { if (process.platform === "linux") {
@ -93,7 +93,7 @@ async function setupLLVMDeps_raw(arch: string) {
await setupGcc(getVersion("gcc", undefined, await ubuntuVersion()), "", arch, 40) await setupGcc(getVersion("gcc", undefined, await ubuntuVersion()), "", arch, 40)
} }
} }
const setupLLVMDeps = memoize(setupLLVMDeps_raw, { promise: true }) const setupLLVMDeps = await memoize(setupLLVMDeps_raw, { promise: true })
export async function activateLLVM(directory: string) { export async function activateLLVM(directory: string) {
const ld = process.env.LD_LIBRARY_PATH ?? "" const ld = process.env.LD_LIBRARY_PATH ?? ""

View File

@ -317,4 +317,4 @@ async function addPythonBaseExecPrefix_raw(python: string) {
* *
* The answer is cached for subsequent calls * The answer is cached for subsequent calls
*/ */
export const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_raw, { promise: true }) export const addPythonBaseExecPrefix = await memoize(addPythonBaseExecPrefix_raw, { promise: true })

View File

@ -14,4 +14,4 @@ function macosVersion_raw() {
const { version } = macosRelease() const { version } = macosRelease()
return version.split(".").map((v) => Number.parseInt(v, 10)) return version.split(".").map((v) => Number.parseInt(v, 10))
} }
export const macosVersion = memoize(macosVersion_raw) export const macosVersion = await memoize(macosVersion_raw)

View File

@ -34,7 +34,7 @@ async function ubuntuVersion_raw(): Promise<number[] | null> {
} }
/** Detect Ubuntu version */ /** Detect Ubuntu version */
export const ubuntuVersion = memoize(ubuntuVersion_raw, { promise: true }) export const ubuntuVersion = await memoize(ubuntuVersion_raw, { promise: true })
/** Detect Ubuntu version using os.version() for Ubuntu based distros */ /** Detect Ubuntu version using os.version() for Ubuntu based distros */
function detectUsingOsVersion() { function detectUsingOsVersion() {

View File

@ -129,7 +129,7 @@ async function getPipxHome_raw() {
await mkdirp(join(pipxHome, "venv")) await mkdirp(join(pipxHome, "venv"))
return pipxHome return pipxHome
} }
const getPipxHome = memoize(getPipxHome_raw, { promise: true }) const getPipxHome = await memoize(getPipxHome_raw, { promise: true })
async function getPipxBinDir_raw() { async function getPipxBinDir_raw() {
if (process.env.PIPX_BIN_DIR !== undefined) { if (process.env.PIPX_BIN_DIR !== undefined) {
@ -141,7 +141,7 @@ async function getPipxBinDir_raw() {
await mkdirp(pipxBinDir) await mkdirp(pipxBinDir)
return pipxBinDir return pipxBinDir
} }
const getPipxBinDir = memoize(getPipxBinDir_raw, { promise: true }) const getPipxBinDir = await memoize(getPipxBinDir_raw, { promise: true })
async function getPython_raw(): Promise<string> { async function getPython_raw(): Promise<string> {
const pythonBin = (await setupPython(getVersion("python", undefined, await ubuntuVersion()), "", process.arch)).bin const pythonBin = (await setupPython(getVersion("python", undefined, await ubuntuVersion()), "", process.arch)).bin
@ -150,7 +150,7 @@ async function getPython_raw(): Promise<string> {
} }
return pythonBin return pythonBin
} }
const getPython = memoize(getPython_raw, { promise: true }) const getPython = await memoize(getPython_raw, { promise: true })
async function pipHasPackage(python: string, name: string) { async function pipHasPackage(python: string, name: string) {
const result = await execa(python, ["-m", "pip", "-qq", "index", "versions", name], { const result = await execa(python, ["-m", "pip", "-qq", "index", "versions", name], {