Skip to content

Commit

Permalink
build: golang/cosmos compat with Yarn 4
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Sep 6, 2024
1 parent 2514098 commit fd40918
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
3 changes: 3 additions & 0 deletions golang/cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"napi-thread-safe-callback": "0.0.6",
"node-addon-api": "^1.7.1"
},
"devDependencies": {
"node-gyp": "^10.2.0"
},
"author": "Agoric",
"license": "Apache-2.0",
"bugs": {
Expand Down
10 changes: 8 additions & 2 deletions packages/deployment/Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,23 @@ RUN set -eux; \
FROM node:18-bullseye AS cosmos-package
ENV YARN_GLOBAL_FOLDER=/root/.yarn

WORKDIR /usr/src/agoric-sdk
COPY --link .yarnrc.yml lerna.json package.json repoconfig.sh tsconfig.json yarn.lock ./

WORKDIR /usr/src/agoric-sdk/golang/cosmos
COPY --from=cosmos-go --link /usr/src/agoric-sdk/golang/cosmos .
COPY --link scripts /usr/src/agoric-sdk/scripts

RUN corepack enable
RUN echo unknown > git-revision.txt

# We allow lockfile mutation here to avoid having to copy all the packages into this image.
# (Yarn 4's --immutable flag seems to assume no fewer deps than the lockfile.)
# Other tests ensure that golang/cosmos builds without mutating the lockfile.
# XXX until https://github.com/Agoric/agoric-sdk/issues/9043, then just:
# RUN yarn install --frozen-lockfile
# RUN yarn install
RUN bash -c \
"for i in {1..3}; do yarn install --frozen-lockfile --network-timeout 1000000 && exit 0 || (echo retrying; sleep 15;) done; exit 1"
"for i in {1..3}; do yarn install --network-timeout 1000000 && exit 0 || (echo retrying; sleep 15;) done; exit 1"
RUN yarn build:gyp

# Remove dev dependencies.
Expand Down
41 changes: 21 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ __metadata:
bindings: "npm:^1.2.1"
napi-thread-safe-callback: "npm:0.0.6"
node-addon-api: "npm:^1.7.1"
node-gyp: "npm:^10.2.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -13343,6 +13344,26 @@ __metadata:
languageName: node
linkType: hard

"node-gyp@npm:^10.2.0, node-gyp@npm:latest":
version: 10.2.0
resolution: "node-gyp@npm:10.2.0"
dependencies:
env-paths: "npm:^2.2.0"
exponential-backoff: "npm:^3.1.1"
glob: "npm:^10.3.10"
graceful-fs: "npm:^4.2.6"
make-fetch-happen: "npm:^13.0.0"
nopt: "npm:^7.0.0"
proc-log: "npm:^4.1.0"
semver: "npm:^7.3.5"
tar: "npm:^6.2.1"
which: "npm:^4.0.0"
bin:
node-gyp: bin/node-gyp.js
checksum: 10c0/00630d67dbd09a45aee0a5d55c05e3916ca9e6d427ee4f7bc392d2d3dc5fad7449b21fc098dd38260a53d9dcc9c879b36704a1994235d4707e7271af7e9a835b
languageName: node
linkType: hard

"node-gyp@npm:^9.0.0":
version: 9.4.0
resolution: "node-gyp@npm:9.4.0"
Expand All @@ -13364,26 +13385,6 @@ __metadata:
languageName: node
linkType: hard

"node-gyp@npm:latest":
version: 10.2.0
resolution: "node-gyp@npm:10.2.0"
dependencies:
env-paths: "npm:^2.2.0"
exponential-backoff: "npm:^3.1.1"
glob: "npm:^10.3.10"
graceful-fs: "npm:^4.2.6"
make-fetch-happen: "npm:^13.0.0"
nopt: "npm:^7.0.0"
proc-log: "npm:^4.1.0"
semver: "npm:^7.3.5"
tar: "npm:^6.2.1"
which: "npm:^4.0.0"
bin:
node-gyp: bin/node-gyp.js
checksum: 10c0/00630d67dbd09a45aee0a5d55c05e3916ca9e6d427ee4f7bc392d2d3dc5fad7449b21fc098dd38260a53d9dcc9c879b36704a1994235d4707e7271af7e9a835b
languageName: node
linkType: hard

"node-int64@npm:^0.4.0":
version: 0.4.0
resolution: "node-int64@npm:0.4.0"
Expand Down

0 comments on commit fd40918

Please sign in to comment.