Open warner opened 1 year ago
Actually, as a workaround, I use git restore packages/*/package.json packages/*/*/package.json
to remove the changes it makes to all the package.json files (inserting a gitHead
field in each), leaving all the generated files in place, then I run yarn lerna publish from-package
a second time. This time, it fails like this:
Removing tools/types-ambient.d.ts
Removing tools/types-ambient.d.ts.map
Removing tools/types.d.ts
Removing tools/types.d.ts.map
lerna info lifecycle @agoric/smart-wallet@0.5.2~prepack: @agoric/smart-wallet@0.5.2
lerna info lifecycle @agoric/vats@0.15.0~prepack: @agoric/vats@0.15.0
lerna info lifecycle @agoric/governance@0.10.2~prepack: @agoric/governance@0.10.2
> @agoric/smart-wallet@0.5.2 prepack /home/node/trees/release/agoric-sdk/packages/smart-wallet
> tsc --build jsconfig.build.json
src/invitations.js:62:17 - error TS2304: Cannot find name 'NameHub'.
62 * @param {ERef<NameHub>} agoricNames
~~~~~~~
Found 1 error.
lerna info lifecycle @agoric/smart-wallet@0.5.2~prepack: Failed to exec prepack script
> @agoric/vats@0.15.0 prepack /home/node/trees/release/agoric-sdk/packages/vats
> tsc --build jsconfig.build.json
error Command failed with exit code 1.
I do the same dance, a few times, and did a few git clean -i
along the way. Eventually, I don't know why, the publish started working.
Not sure if it's relevant, but when I did a git status
after the publish finished, there was a single packages/zoe/tools/types.js
remaining (generated by the process, but not automatically cleaned up).
I think the missing instruction is to do git reset --hard HEAD
, as well as git clean -f .
between from-package
attempts. As to what caused the initial error, was it perhaps TOTP expiry or other interruption of the lerna publish
process?
Our MAINTAINERS.md has a note to repeat the
yarn lerna publish from-package
step multiple times if any errors are encountered. The error I observed while publishing themainnet1B-rc2
packages during this step were:This is after a full
yarn build
.It seems to run
prepack
for all packages, runs into a type problem while building the type files forsmart-wallet
, which then halts the whole process. To resolve it, I had to delete all the generated files, then runyarn lerna publish from-package
again.