Skip to content

wp/6.3 branch doesn't build anymore #60600

Closed

Description

@gziolo

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

Activity

  1. added
    [Type] Build Tooling
    npm Packages
    on Apr 9, 2024
  2. sirreal commented on Apr 9, 2024

    @sirreal
    Member

    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.

  3. tellthemachines commented on Apr 10, 2024

    @tellthemachines
    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.

  4. gziolo commented on Apr 11, 2024

    @gziolo
    MemberAuthor

    @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.

  5. tellthemachines commented on Apr 12, 2024

    @tellthemachines
    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.

  6. gziolo commented on Apr 14, 2024

    @gziolo
    MemberAuthor

    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.

  7. gziolo commented on Jun 13, 2024

    @gziolo
    MemberAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Build Toolingnpm Packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions