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

[Meteor 3] Fix how to compare constraints version when publishing a package #13082

Open
wants to merge 4 commits into
base: release-3.0
Choose a base branch
from

Conversation

denihs
Copy link
Contributor

@denihs denihs commented Apr 5, 2024

We had reports that people weren't able to deploy packages because they were getting the error:

inconsistent dependency constraint across unibuilds?

Debugging further, I could check that here, d.constraint and use.constraint were never equal if using api.versionsFrom with conditioning versions for a package, like '[email protected]||2.0.0-beta300.7'.

What I'm doing on this PR is to verify if the package constraint version is available in the specified Meteor version determined by api.versionsFrom.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for v3-meteor-api-docs canceled.

Name Link
🔨 Latest commit cab0f40
🔍 Latest deploy log https://app.netlify.com/sites/v3-meteor-api-docs/deploys/662b5b30dfec1a0008a43512

@StorytellerCZ StorytellerCZ added this to the Release 3.0 milestone Apr 8, 2024
@nachocodoner
Copy link
Member

I'm wondering if we could develop tests to aid in this verification process. Could we add a self-test for this build stuff, perhaps even unit testing for this specific handling?

Copy link

netlify bot commented Apr 25, 2024

Deploy Preview for v3-migration-docs canceled.

Name Link
🔨 Latest commit cab0f40
🔍 Latest deploy log https://app.netlify.com/sites/v3-migration-docs/deploys/662b5b30d16000000760aca6

@zodern
Copy link
Member

zodern commented Apr 26, 2024

I tested this with the cause for the error from #13111, and this PR incorrectly allows the inconsistent constraints.

If you add this to Package.onUse:

  api.use('montiapm:[email protected]||3.0.0-beta.4');
  api.imply('montiapm:[email protected]');

Meteor should error since having different constraints for a package in api.use and api.imply is unsupported. When running with this PR, Meteor instead builds the package without erroring.


#13111 only updates one place that calls getDependencyMetadata. There's a second place in publishPackage that could also be updated to show better error messages. That might help with debugging this issue.

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

Successfully merging this pull request may close these issues.

None yet

4 participants