-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Bug] Compat issue with current and pre-3.27.0 versions of ember-source #19700
Comments
@MelSumner Can you share a reproduction? What is in your addon? Did you consume anything from the addon in the host app? |
I missed that step of creating a component and using it. I see the error when I do so (3.27.2 addon and 3.24.0 app). I played with adding a backing class to the component I generated, making it a glimmer component to see if that would work, but @ember/component still ends up referenced, here's the compiled component: define("test-foo/components/what", ["exports", "@ember/component", "@glimmer/component"], function (_exports, _component, _component2) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
const __COLOCATED_TEMPLATE__ = Ember.HTMLBars.template(
/*
Hello again{{yield}}
*/
{
"id": "AmEtBAC8",
"block": "{\"symbols\":[\"&default\"],\"statements\":[[2,\"Hello again\"],[18,1,null],[2,\"\\n\"]],\"hasEval\":false,\"upvars\":[]}",
"moduleName": "test-foo/components/what.hbs"
});
class WhatComponent extends _component2.default {}
_exports.default = WhatComponent;
(0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, WhatComponent);
}); |
@kategengler thank you for confirming the issue. @pzuraq should I be looking in Glimmer packages to see if something is exporting |
Nothing in the Glimmer packages should be exporting I think this is likely a bug with the globals transform in What's probably happening is import { setComponentTemplate } from '@ember/component';
import { createTemplateFactory } from '@ember/template-factory';
import Component from '@glimmer/component';
class WhatComponent extends Component {}
setComponentTemplate(createTemplateFactory('wat'), WhatComponent); At this point, we do have the import from |
Cannot reproduce when referencing an addon via github (and presumably npm). Can reproduce when addon is referenced via the filesystem. 3.24 app with addon referenced via file system and component from addon in use https://github.com/kategengler/ember-324 reproduces the problem 3.27 addon with component https://github.com/kategengler/test-foo Clone the addon side-by-side with the app to see the bug. Change |
Closing as no longer relevant. Sorry for letting the issue slip! |
🐞 Describe the Bug
I built a new addon with 3.27.2 and found that it did not work in any apps that use
ember-source
prior to 3.27.0 (I specifically tested 3.22.0, 3.24.0, 3.26.1, 3.27.0).🔬 Minimal Reproduction
yarn link "my-addon"
in the app's root directoryapplication.hbs
templateember s
in the appember-source
by 1 version, npm/yarn install, runember s
and see if the app renders😕 Actual Behavior
I see an error in the browser console: "Cannot find module `@ember/component in (addon name)" when I have an addon on 3.27.2 and an app that is anything before 3.27.0. Conversely, if I downgrade my addon to pre-3.27.0, I can use it in pre-3.27.0 apps.
🤔 Expected Behavior
I expect minor versions to be compatible.
🌍 Environment
I tried this on both latest MacOS and latest Windows, both with latest Chrome.
➕ Additional Context
I used
yarn why ember-source
to confirm that I was getting different versions ofember-source
.The text was updated successfully, but these errors were encountered: