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

wp/6.3 branch doesn't build anymore #60600

Closed
gziolo opened this issue Apr 9, 2024 · 6 comments
Closed

wp/6.3 branch doesn't build anymore #60600

gziolo opened this issue Apr 9, 2024 · 6 comments
Labels
npm Packages Related to npm packages [Type] Build Tooling Issues or PRs related to build tooling

Comments

@gziolo
Copy link
Member

gziolo commented Apr 9, 2024

Description

We can't publish WordPress packages from wp/6.3 branch anymore because the build fails with the following error caused by TypeScript validation:

> gutenberg@16.1.0-rc.1 build:package-types /Users/gziolo/Projects/gutenberg
> node ./bin/packages/validate-typescript-version.js && tsc --build && node ./bin/packages/check-build-type-declaration-files.js

packages/components/src/popover/index.tsx:346:3 - error TS2339: Property 'reference' does not exist on type '{ placement: Placement; strategy: Strategy; middlewareData: MiddlewareData; x: number; y: number; isPositioned: boolean; update: () => void; floatingStyles: CSSProperties; refs: { ...; }; elements: { ...; }; }'.

346   reference: referenceCallbackRef,
      ~~~~~~~~~

packages/components/src/popover/index.tsx:347:3 - error TS2339: Property 'floating' does not exist on type '{ placement: Placement; strategy: Strategy; middlewareData: MiddlewareData; x: number; y: number; isPositioned: boolean; update: () => void; floatingStyles: CSSProperties; refs: { ...; }; elements: { ...; }; }'.

347   floating,

Step-by-step reproduction instructions

  1. Checkout the wp/6.3 branch.
  2. Run nvm use to set the proper Node.js version.
  3. Run npm install.
  4. Run npm run build.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@gziolo gziolo added [Type] Build Tooling Issues or PRs related to build tooling npm Packages Related to npm packages labels Apr 9, 2024
@sirreal
Copy link
Member

sirreal commented Apr 9, 2024

Did this happen on CI or locally?

I was able to reproduce the issue, but as I debugged it resolved itself 😅 Clearing typescript caches may be sufficient to fix it.

npm ci
./node_modules/.bin/tsc --build --clean
npm run build:package-types

My suspicion is that some stale types for the wrong version of @floating-ui/react-dom package was being used in caches.

@tellthemachines
Copy link
Contributor

My suspicion is that some stale types for the wrong version of @floating-ui/react-dom package was being used in caches.

Sounds right, we had problems with that dependency during the whole 6.3 release cycle. #46845 fixes it but I'm not sure if it would be safe to include in the 6.3 branch.

@gziolo
Copy link
Member Author

gziolo commented Apr 11, 2024

@tellthemachines, do you remember why you had to re-try the npm publishing job for the 6.3 release branch? Maybe, that was an issue with CI, not building TypeScript types.

@tellthemachines
Copy link
Contributor

@gziolo I started the workflow for the 6.2 branch before 6.3 had finished, and then noticed the 6.3 job had stopped. So when 6.2 was finished, I restarted 6.3. I still don't know if the problem was with trying to run more than one job at a time or if something else went wrong.

I think in any case we should make the job fail if the packages aren't published.

@gziolo
Copy link
Member Author

gziolo commented Apr 14, 2024

Technically speaking if there were no changes in the branch then there is nothing to publish so when re-trying Lerna was correct. However, the challenge would be figuring out if we could instead of failing, add something that would be able to verify whether the versions of packages on GitHub match what’s on npm. Maybe it would be enough to run npx lerna publish from-package --dist-tag wp-6.3 to potentially resume publishing as it’s what I did locally on Tuesday.

@gziolo
Copy link
Member Author

gziolo commented Jun 13, 2024

It doesn't seem to be an issue anymore when I try to build packages locally with the fresh repository.

@gziolo gziolo closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Packages Related to npm packages [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

No branches or pull requests

3 participants