google / blockly-samples

Plugins, codelabs, and examples related to the Blockly library.
http://github.com/google/blockly
Apache License 2.0
820 stars 613 forks source link

`npm run test:ghpages:beta` doesn't work for hoisting #2397

Open maribethb opened 1 month ago

maribethb commented 1 month ago

Check for duplicates

Component

blockly-samples infrastructure

Description

We recently changed how we structure the dependencies in samples to use hoisting so we eliminate the "two blockly problem"

However running npm run test:ghpages:beta will try to install blockly@beta inside every plugin which is now wrong. That's fine for examples where we're not using hoisting. For samples it needs to install blockly@beta at the root of samples. but there might be problems if the plugins say they require a version of blockly that isn't compatible with the beta.

Don't run this command until this is fixed

Reproduction steps

Stack trace

No response

Screenshots

No response

cpcallen commented 3 weeks ago

There seem to be three ways we could go here:

  1. Just delete this command, and if you want to do what it did do a manual npm install of the beta before running npm run test:ghpages.
  2. Modify the implementation to install the beta at the root and accept that sometimes things will break if the versions are incompatible.
  3. Have this command attempt to ensure that each of the plugins/examples at least claims to be compatible, so that we can test (but maybe some of them will be broken if they're not really compatible.

It's not clear what the best approach is.

cpcallen commented 1 week ago

Per discussion with @rachel-fenichel: recommend going with option 2, since most typically when running this command we're going to be interested in discovering actual incompatibilities between plugins and Blockly beta, rather than discovering (or carefully avoiding) nominal peerDependency version incompatiblities.