-
Notifications
You must be signed in to change notification settings - Fork 20
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 Embroider support #29
Conversation
So it looks like the "embroider safe implementation" is actually working, since all the ember-try scenarios are working. We seem to be hitting a different problem though 🤔 I'm getting an exception I've tracked it down to this line https://github.com/embroider-build/embroider/blob/master/packages/compat/src/compat-addons.ts#L195 where Here's a screenshot covering what I said about the current state of the app at that error (see the watch values in the top right): |
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from from the said error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
@mansona do you have an open issue on the embroider repo? |
@mansona I think you only need to update the |
@davideferre thanks that has fixed it! I'd be super curious what the issue was upstream 🙃 |
Also I'm curious why you said that this was blocking the Ember 4 release? Embroider and Ember 4 are 2 different issues 🤔 |
Be advised that embroider 0.48.0 and higher have a working compat adapter that completely overrides ember-get-config's implementation anyway: https://github.com/embroider-build/embroider/blob/f7a4ad0e4d939446ba47c5a0a1adb4a4bb463b9d/packages/compat/src/compat-adapters/ember-get-config.ts Which is why apps are able to use embroider even when some of their addons have a version of ember-get-config that doesn't work. We can update the compat adapter so it leaves ember-get-config 1.0 alone. And pretty soon we can port ember-get-config to v2 format, which avoids the whole compat system. I think that is blocked on implementing a part of the v2 addon spec that we haven't had to do yet (the build file support). |
Sorry, I don't know why I wrote Ember 4 instead of Embroider, maybe the late hour can explains this error 😅 |
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
1. The coment says this override can be removed once mansona/ember-get-config#29 has been merged, and it was merged. 2. `ember-get-config` package was uninstalled in commit 56b2fe8 .
No description provided.