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

add default overrides for generated beta and canary configs #191

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mansona
Copy link
Member

@mansona mansona commented Jun 28, 2023

I'm in the process of getting ember-cli/ember-try#920 to pass and I came across a curious problem. All of the auto-generated scenarios all need to have an override to make npm happy 😫

This PR adds that override and makes sure that tests pass 👍

@kategengler
Copy link
Member

Won't custom scenarios also need this override? I was chatting the other day in discord about this. I think it is possible that ember-try should automatically add overrides/resolutions for some (if not all) packages defined in a scenario.

@mansona
Copy link
Member Author

mansona commented Jun 29, 2023

I'm not too sure about the overrides for everything 🤔 I feel like the whole point of ember-try is to try ember-source on different versions so it makes sense that ember-source has these overrides

My personal plan is that I was going to get ember-try released with support for overrides and then I was going to PR this override to the default blueprint too. I think that is probably a good start and then we can worry about overriding everything later.

What do you think?

@kategengler
Copy link
Member

I thought that for quite awhile but I have been convinced that ember-try gets used beyond that use case. ember-try can be used for any npm package for which you want to test against multiple versions.

But ignoring that, even considering just the ember-source use case, sometimes you need to change other packages to "go with" that particular ember-source version. Most recently, we had to specify ember-resolver for certain scenarios. On the version of npm you are using, wouldn't that also need an override to be happy?

@@ -33,6 +33,9 @@ async function generateScenariosFromSemver(semverStatements, availableVersions)
devDependencies: {
'ember-source': versionNum,
},
overrides: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These configs are used whether npm, yarn, or now pnpm is used. What does overrides do in pnpm? Does pnpm also support the $ember-source syntax?

Is it ignored properly in yarn? Does a new project in yarn have the same problem and need resolutions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so [email protected] never did strict peer checks

pnpm only listens to overrides that are inside a pnpm keyed object, and pnpm doesn't have the exact same issue because pnpm considers pre-releases as matching when their ranges match

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to confirm that both pnpm and yarn will ignore overrides, if so, I think this approach is fine for the automated config, but if we put it in the blueprint I think it will be confusing to non-npm users, so it should be conditional and only there for npm users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this hide peer dependency issues? For example, in the run up to 5.0, ember-try runs for addons caught that various other addons had incorrect (or overly restrictive) peer dependency on ember-source and needed to be loosened.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will only peer dependency issues with ember-source and only on auto-generated configs. When I say that I plan to add this to the default blueprint I mean only for release, canary, and beta because they will never work because of npm considering the pre-releases not inside legit ranges 😫

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beta and canary I understand, release should work though

@mansona mansona changed the title add default overrides for generated configs add default overrides for generated beta and canary configs Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants