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

v7.30.1 has somehow changed the way our dependencies work causing builds to break #6271

Closed
ynotdraw opened this issue Mar 23, 2023 · 7 comments
Milestone

Comments

@ynotdraw
Copy link

ynotdraw commented Mar 23, 2023

pnpm version: 7.30.1

Code to reproduce the issue:

  • Be sure you are using pnpmv7.30.1 by running pnpm -v and verifying it returns 7.30.1.
  • Pull down https://github.com/CrowdStrike/ember-toucan-core
  • pnpm i
  • cd ember-toucan-core
  • pnpm i
  • pnpm build
  • cd ../test-app
  • pnpm i
  • ember try:each --config-path="config/ember-try.js"
  • The tests will now run using the scenario matching in the GitHub links below
  • The error will occur on the "embroider" steps

The embroider steps update dependencies to use the following:

Along with the dependencies that are defined here:

Essentially we are testing against "newer" versions of packages by using these "try scenarios".

Expected behavior:

  • Expect the tests command to not fail, as it works with v7.30.0

Actual behavior:

Essentially we are hitting this line: https://github.com/embroider-build/embroider/blob/00ec2e7e58f546a5e19a23740302e49883d664d3/packages/util/addon/ember-private-api.js#L18, where it thinks we are using an older version of ember-source despite our pnpm-lock.yml saying otherwise (4.11.0).

Additional information:

@zkochan
Copy link
Member

zkochan commented Mar 23, 2023

Might be related to this issue: #6272

Maybe caused by this PR: #6220

@zkochan
Copy link
Member

zkochan commented Mar 23, 2023

track #6272

@zkochan zkochan closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2023
@zkochan
Copy link
Member

zkochan commented Mar 24, 2023

Try 7.30.2

@zkochan
Copy link
Member

zkochan commented Mar 24, 2023

I am not sure I fixed this issue. But I also get an error with 7.30.0

Scenario ember-lts-4.8 + embroider-optimized: FAIL
Command run: ember test
with env: {
  "EMBROIDER_TEST_SETUP_OPTIONS": "optimized"
}
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/core    │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/webpack │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/compat  │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5.0.0             │ 5.75.0                       │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ ~4.8.0             │ 4.8.4                        │ pnpm     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘

Scenario ember-release + embroider-optimized: SUCCESS
Command run: ember test
with env: {
  "EMBROIDER_TEST_SETUP_OPTIONS": "optimized"
}
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/core    │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/webpack │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ @embroider/compat  │ ^2.1.1             │ 2.1.1                        │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ webpack            │ ^5.0.0             │ 5.75.0                       │ pnpm     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ https://s3.amazon… │ 4.11.0-release+88df843c      │ pnpm     │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘


1 scenarios failed
5 scenarios succeeded
6 scenarios run

So I am not sure I can verify it locally

@ynotdraw
Copy link
Author

ynotdraw commented Mar 24, 2023

Hi @zkochan. Thanks for jumping on this so quickly! I attempted to use v7.30.2 and am still seeing the same error (https://github.com/CrowdStrike/ember-toucan-core/actions/runs/4511056356/jobs/7942813549?pr=101 via CrowdStrike/ember-toucan-core#101).

That is strange about yours failing already for v7.30.0 as well. If you scroll up in the console past the tables, there should be additional information (hopefully) about what error it was hitting (or if you search Scenario: ember-lts-4.8 + embroider-optimized). It should look something like this when passing:

=== Scenario: ember-lts-4.8 + embroider-optimized ==============================
Environment: test
⠋ BuildingSuccessfully applied EMBROIDER_TEST_SETUP_OPTIONS=optimized
Building into /private/var/folders/pp/ss8llyp53j1bhwbbckdh6bmr0000gn/T/embroider/37cc7e
cleaning up...
Built project successfully. Stored in "/var/folders/pp/ss8llyp53j1bhwbbckdh6bmr0000gn/T/tests-dist-2023223-93823-kbsunx.851l".
ok 1 Chrome 111.0 - [57 ms] - Integration | Component | button: it renders
ok 2 Chrome 111.0 - [41 ms] - Integration | Component | button: it yields a loading named block when `@isLoading={{true}}
ok 3 Chrome 111.0 - [38 ms] - Integration | Component | button: it does not render the content in the loading named block when `@isLoading={{false}}
ok 4 Chrome 111.0 - [39 ms] - Integration | Component | button: it sets `aria-disabled="true"` when `@isDisabled={{true}}
ok 5 Chrome 111.0 - [39 ms] - Integration | Component | button: it yields a disabled named block when `@isDisabled={{true}}

or when failing:

=== Scenario: ember-lts-4.8 + embroider-optimized ==============================
Environment: test
⠋ BuildingSuccessfully applied EMBROIDER_TEST_SETUP_OPTIONS=optimized
Building into /private/var/folders/pp/ss8llyp53j1bhwbbckdh6bmr0000gn/T/embroider/37cc7e
cleaning up...
Built project successfully. Stored in "/var/folders/pp/ss8llyp53j1bhwbbckdh6bmr0000gn/T/tests-dist-2023223-93823-kbsunx.851l".

not ok 1 Chrome 111.0 - [undefined ms] - Global error: Uncaught TypeError: Cannot read properties of undefined (reading '__loader') at webpack://test-app/../node_modules/.pnpm/@embroider+util@1.10.0_o3ueax46tohlct7p74rdwqxbue/node_modules/@embroider/util/ember-private-api.js?, line 16
    ---
        browser log: |
            {"type":"error","text":"Uncaught TypeError: Cannot read properties of undefined (reading '__loader') at webpack://test-app/../node_modules/.pnpm/@embroider+util@1.10.0_o3ueax46tohlct7p74rdwqxbue/node_modules/@embroider/util/ember-private-api.js?, line 16\n","testContext":{}}

@zkochan
Copy link
Member

zkochan commented Mar 24, 2023

It seems to work with 7.30.3-0

https://github.com/zkochan/ember-headless-form/actions/runs/4511077698/jobs/7942827608

zkochan added a commit that referenced this issue Mar 24, 2023
@ynotdraw
Copy link
Author

Indeed - most excellent! Thank you!

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

No branches or pull requests

2 participants