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

resolve failed macro condition in ember-private-api #1053

Conversation

NullVoxPopuli
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli commented Dec 13, 2021

Goal to resolve: #1038

Only occurs when the host-app's ember-source is alpha or beta

@NullVoxPopuli
Copy link
Collaborator Author

NullVoxPopuli commented Dec 13, 2021

hm, nevermind, this isn't the fix. I cleared all my node_modules, re-linked, and teh issue from #1038 came back. (I was apparently still working with my manual patch)

@NullVoxPopuli
Copy link
Collaborator Author

@ef4 I did it! I just needed to use * for the version instead of specific versions

@NullVoxPopuli
Copy link
Collaborator Author

I don't know how to make a test for this tho.

@NullVoxPopuli NullVoxPopuli changed the title Try to resolve failed macro condition in ember-private-api resolve failed macro condition in ember-private-api Dec 18, 2021
@NullVoxPopuli
Copy link
Collaborator Author

hm, maybe the * breaks non-alpha/non-beta ember-source 🤔

based on the failing tests, it seems that the * version is used instead of the host app's version?

@ef4
Copy link
Contributor

ef4 commented Dec 20, 2021

There are two bad things that ember-cli does and we follow for compatibility that were causing trouble here.

One is that dummy apps and addons share a package.json, so adding the peerDep to the addon (which is correct) also adds it to the dummy app (which is unnecessary at best but here actually triggers the following bug).

Two is that we have special logic to cause apps to not discover addons in peerDeps, because that's what ember-cli does. So the dummy app stopped discovering the ember-source addon.

I had to adjust the logic so that a peerDep that's also a dep will get discovered.

@ef4 ef4 merged commit 2198284 into embroider-build:master Dec 20, 2021
@ef4 ef4 added the bug Something isn't working label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants