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

Looks like v6.1.0 may have been a breaking change? #997

Closed
kellyselden opened this issue Dec 16, 2022 · 4 comments · Fixed by #998
Closed

Looks like v6.1.0 may have been a breaking change? #997

kellyselden opened this issue Dec 16, 2022 · 4 comments · Fixed by #998
Labels

Comments

@kellyselden
Copy link
Member

From the renovate PR:

client test: ERROR Summary:
client test:   - broccoliBuilderErrorStack: [undefined]
client test:   - code: [undefined]
client test:   - codeFrame: [undefined]
client test:   - errorMessage: ember-qunit has the following unmet peerDependencies:
client test: 	* @glimmer/reference: `^0.84.2`; it was resolved to `0.83.1`
client test:   - errorType: [undefined]
client test:   - location:
client test:     - column: [undefined]
client test:     - file: [undefined]
client test:     - line: [undefined]
client test:   - message: ember-qunit has the following unmet peerDependencies:
client test: 	* @glimmer/reference: `^0.84.2`; it was resolved to `0.83.1`
client test:   - name: Error
client test:   - nodeAnnotation: [undefined]
client test:   - nodeName: [undefined]
client test:   - originalErrorMessage: [undefined]
client test:   - stack: Error: ember-qunit has the following unmet peerDependencies:
client test: 	* @glimmer/reference: `^0.84.2`; it was resolved to `0.83.1`
@flashios09
Copy link

I'm having the same issue on ember build --environment production

ember-qunit has the following unmet peerDependencies:

        * @glimmer/interfaces: `^0.84.2`; it was resolved to `0.83.1`
        * @glimmer/reference: `^0.84.2`; it was resolved to `0.83.1`


Stack Trace and Error Report: /tmp/error.dump.e8327f6b4068388b51f5cc67fc1e71ad.log

ember-qunit 6.0.0:

"peerDependencies": {
    "@ember/test-helpers": "^2.4.0",
    "qunit": "^2.13.0"
 }

ember-qunit 6.1.0:

"peerDependencies": {
    "@ember/test-helpers": "^2.4.0",
    "@glimmer/interfaces": "^0.84.2",
    "@glimmer/reference": "^0.84.2",
    "@types/ember-resolver": "^5.0.13",
    "@types/ember__test": "^4.0.1",
    "@types/ember__test-helpers": "^2.8.2",
    "@types/rsvp": "^4.0.4",
    "ember-source": "^3.28 || ^4.0",
    "qunit": "^2.13.0"
 }

@chriskrycho
Copy link
Contributor

Hmm, not intended to be; possibly I failed to mark those as peerDependenciesMeta['@glimmer/reference'].optional = true in package.json. I will have this at the top of my priority list on Monday morning. (PR welcome, too!) If they are correctly optional peer dependencies it should not be a breaking change, as you should be able to opt in.

@bertdeblock
Copy link
Member

AFAICT, they are correctly marked as optional. Maybe this is an issue with https://github.com/rwjblue/validate-peer-dependencies instead? Which is responsible for throwing this error.

@chriskrycho
Copy link
Contributor

chriskrycho commented Dec 19, 2022

The validate-peer-dependencies implementation handles this correctly, here. But it turns out that only handles the case where the peer dependency isn't installed at all. This makes sense, and is ultimately the cause of the bug here: the validator correctly identifies that ember-qunit (and other such packages) are specifying that the dep is optional… but that if present, it must match a specific version which we aren't matching.

The solution here, then, is one of two paths:

  • Drop the explicit peerDependencies value, since that is breaking in practice.
  • Widen the constraint for the peerDependencies to the versions likely to be in use for Ember 3.28+, which will avoid a breaking change.

I'm going to go ahead publish a 6.1.1 which just drops it to avoid churning here. When, at some point, we cut v7.0.0 (presumably when we drop Node 14, and also at that point drop Ember 3.28), we can and should add the explicit constraint on @glimmer/interfaces and @glimmer/references.a

chriskrycho added a commit that referenced this issue Dec 19, 2022
I originally [thought][1] these `peerDependencies` were not breaking
because users would be able to opt into them. Unfortunately, this is
[not the case][2]: users on Ember 3.28 will have an older copy of these
dependencies, so correctly validating these breaks consumers.

[1]: #995 (comment)
[2]: #997 (comment)

We should bundle these into a v7.0.0 when we drop Node 14 and Ember
3.28, presumably in ~April 2023.
chriskrycho added a commit that referenced this issue Dec 19, 2022
I originally [thought][1] these `peerDependencies` were not breaking
because users would be able to opt into them. Unfortunately, this is
[not the case][2]: users on Ember 3.28 will have an older copy of these
dependencies, so correctly validating these breaks consumers.

[1]: #995 (comment)
[2]: #997 (comment)

We should bundle these into a v7.0.0 when we drop Node 14 and Ember
3.28, presumably in ~April 2023.

Fixes #997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants