-
Notifications
You must be signed in to change notification settings - Fork 109
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
instanceof
fails in classic mode
#588
Comments
Do you have a PR where this is easily reproducible? Potentially related: |
Here is a PR: gossi/ember-command#22 But I think, I failed on CI setup for github, so must be done locally:
Notes:
Also, I left a comment to this issue within the code to see when I left workarounds. Search for My workaround: duck-typing and |
@NullVoxPopuli that is exactly the issue. The module graph essentially creates two different copies of the module so when you import something from a test file it can never be |
I am trying to convert a legacy addon into a v2 addon in a project using ember-auto-import and I think I am running into this as well |
If the issue here is indeed related to #503, then I think we can close this now, as the bug has been fixed a wile ago! Can someone confirm? |
I took recent main branch from I think, this means, this can be closed. Thanks a lot everybody :) |
I'm rewriting
ember-command
as v2 addon. The check I have there to test for links are:To ensure embroider compatibility I'm using ember-try for with embroider scenarios. By default, when starting locally, it uses classic mode.
Now I've realized the checks above are failing in classic mode. As these are two different imports under the hood for
Link
andLinkCommand
between the transpiled addon and the host app, thus the tests are failing. My theory is, due to the different locations and two different memory pointers, that's why the checks fail.My workaround was to use a symbol, attach it to the
LinkCommand
and check for the existence of the symbol... it is failing, too (I think for the same reason).When starting the test app in embroider mode:
EMBROIDER_TEST_SETUP_FORCE='embroider' ember s
the checks work as expected.The text was updated successfully, but these errors were encountered: