Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Yarn to v3 (berry) #8461

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

update Yarn to v3 (berry) #8461

wants to merge 16 commits into from

Conversation

turadg
Copy link
Member

@turadg turadg commented Oct 18, 2023

closes: #451

Description

Version 4 seems close to release (4.0.rc53 is out) but the breaking changes won't affect us much so let's go ahead to v3 now. https://github.com/yarnpkg/berry/blob/master/CHANGELOG.md#master

Security Considerations

n/a. Though does open the option to keep the registry cache in the repo, reducing supply chain risk.

Scaling Considerations

n/a

Documentation Considerations

I haven't noticed anything breaking workflows. If they are it deserves a loud Slack announcement.

Testing Considerations

CI

Upgrade Considerations

n/a

@turadg
Copy link
Member Author

turadg commented Oct 18, 2023

Need to fix CI: yarnpkg/berry#2621

@turadg turadg marked this pull request as draft October 18, 2023 20:53
@turadg turadg force-pushed the 451-yarn-3 branch 3 times, most recently from 835ed0c to 8b61a2f Compare December 14, 2023 00:02
@turadg turadg force-pushed the 451-yarn-3 branch 2 times, most recently from 5af1c3a to cec543f Compare December 22, 2023 14:48
@turadg
Copy link
Member Author

turadg commented Dec 22, 2023

dapp tests failing to run agoric bin:

❯ ./bin/agoric --version
(ReferenceError#1)
ReferenceError#1: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/opt/agoric/yarn3-sdk/packages/agoric-cli/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
This file is being treated as an ES module because it has a '.js' file extension and '/opt/agoric/yarn3-sdk/packages/agoric-cli/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
  at Object.eval (eval at <anonymous> (eval at makeEvaluate (file:///opt/agoric/yarn3-sdk/node_modules/ses/src/make-evaluate.js:92:27)), <anonymous>:1)
  at eval (eval at makeEvaluate (file:///opt/agoric/yarn3-sdk/node_modules/ses/src/make-evaluate.js:92:27), <anonymous>:12:22)
  at safeEvaluate (file:///opt/agoric/yarn3-sdk/node_modules/ses/src/make-safe-evaluator.js:78:14)
  at eval (file:///opt/agoric/yarn3-sdk/node_modules/ses/src/make-eval-function.js:22:14)
  at Object.<anonymous> (/opt/agoric/yarn3-sdk/node_modules/@yarnpkg/core/lib/miscUtils.js:262:21)

Something in the bowels of SES. Any ideas @kriskowal ?

UPDATE: it was the eval('require') that the package does to work around something in Webpack. I don't know why you'd build Yarn with Webpack but this patch works for now https://github.com/Agoric/agoric-sdk/pull/8461/files#diff-d6b4713855f18df4a84e2fb446d5915b8d5fcafe0be935795c31ddc653e9f4c9

@mhofman
Copy link
Member

mhofman commented Dec 27, 2023

n/a. Though does open the option to keep the registry cache in the repo, reducing supply chain risk.

Can you clarify?

Version 4 seems close to release (4.0.rc53 is out) but the breaking changes won't affect us much so let's go ahead to v3 now.

If we're going through the trouble of upgrading with a breaking change version, have we considered alternative package managers (npm or pnpm)?

In general I am concerned about these low level changes that affect the structure of the repo while we have a release branch to maintain. The rebuild of xsnap motivation seems like an issue that should be fixed by our xsnap package, not the package manager used.

@turadg
Copy link
Member Author

turadg commented Jan 8, 2024

Blocked by #8381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eventually move to Yarn 2+ (currently 4)
2 participants