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
Fix MU addon component invocation #8431
Conversation
Should be fixed by #8431. Please, test it if you have time.
I will investigate it. The issue here was commented at #8424 (comment) Please, could you rename the PR title as I think it worths to mention that the goal of this PR is to detect an Related ember-cli/ember-resolver#298
|
0d667fb
to
4571b1d
Compare
Now, this PR is working: an MU app must consume an MU addon component with the new MU syntax.
I think we should also clarify and include a test for the following issue: How should a classic app consume an MU addon component? I tried something similar on the @patricklx Let me know your thoughts and if you want to check this case. cc/ @rwjblue |
mmm, I tested it now, extending this branch, by changing the MU flags checks in addon.js here to this.isModuleUnification().
2d problem:
and then it passes! :) Is that what we want? I created a similar test like yours and with this changes: https://gist.github.com/patricklx/35ae7c1fc3ccc035e4e528915e9fa8ed |
Yes, I think so. The addon should build its tree based on:
Your changes looks correct, we have now more MU tests; they should fail if something is wrong.
I would include the mentioned change and the test in this PR. This test should validate that a Classic app without It may be very good if this PR also includes the "inverse" test case: An MU app with Including both tests will supercede #8322. |
thx for the ping @ppcano |
2a981bf
to
6f6f2a7
Compare
3191320
to
ac65b05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything pending in this PR? You already added the two tests we talked.
I have reviewed it and suggested some changes.
This PR supersedes #8322 |
449fc1c
to
b67341e
Compare
@ppcano its ready now, |
lib/broccoli/default-packager.js
Outdated
|
||
// also, in tests we pass root path to this function | ||
// in default-packager/tests-test.js | ||
const srcPath = typeof tree === 'string' ? `${tree}/src` : 'src'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue This is the same issue we discussed at #8322 (comment)
The error is triggered by broccoli/lib/builder
before BroccoliFunnel.build
is executed; the BroccoliFunnel.allowEmpty
routine is never executed.
I can investigate this but I need guidance on where to start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patricklx This should be fixed by https://gist.github.com/ppcano/78e14886c7a660d17eadab709802adb0
Would you mind to include it and check if all the tests pass.
a6a9419
to
97c5b70
Compare
@patricklx Great! a6a9419 will be included at #8424 as a separate PR, right? LGTM I think the title and description could be updated to describe better what the PR does: The title could be something like: The description could show an example how it was working before and how it works now, in order anyone could see easily what the PR changes instead of having to look the PR code.
|
One unrelated test failed... Just needs rerun |
@patricklx could you rebase commits into one? @rwjblue this PR is a required change for #8424 and it is totally ready now (it does not include the mentioned dirNotFound hack). |
add tests for addon merging in different scenarios
733f486
to
106bc0d
Compare
This issue should fix #7666 |
sorry @patricklx, will try to review soon (a bit swampped just before EmberConf) |
As module unification is no more, I believe this can be closed. If I am closing this in error please let me know why, and we can reopen. |
MU addons are currently not detected as such, and therefore are always merged into the APP namespace, even when its also an MU project.
This also causes MU addons to be namespaced in tests with MU dummy app, which required the change in the acceptance test
That means the this invocation cannot be used anymore (where basic-thing is an addon component)
and instead the following must be used