-
Notifications
You must be signed in to change notification settings - Fork 6
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
addon no longer works when declared as a "dependency" from an addon with v0.1.4 and DOES work with v0.1.3 #97
Comments
I think the behavior you’re describing would be part of the bug fixed in the cross linked PR. To me (note: this could be checked with a maintainer), ember-cached-decorator-polyfill should be present in the project that makes use of the cached decorator. So, to upgrade to 0.1.4 you would have to:
|
@dcyriller I'm trying really hard to not manage the version of cache decorators in all 7+ other apps and addons; that the "bug" of <0.1.4 has enabled us to use it the decorator for. |
I hear it is painful for you (and other users) to add the dependency in every one of your apps. When you want to upgrade the polyfill, you have to bump it in 7+ apps. A possible solution would be to register the babel plugin for both the addon tree and the host app tree. On the plus side, it would solve this issue. On the minus side, it sounds vaguely odd from a performance perspective. Indeed, every app depending on an addon depending on the polyfill would get transpiled with the babel plugin. As more and more addons are starting to use this polyfill (ember-data will start using it in 3.18), it means that more and more apps would get transpiled with the babel plugin. |
Sorry, don't want to sound ignorant, but I genuinely don't understand what the problem is? Adding one line to The semantics of dependencies, especially for build-time transforms like polyfills, is pretty consistent: when you need it, you need to declare it a dependency. When you need Babel transpilation in your app (all do), the app needs |
it's desired that between the 7 (and growing number) of apps that make use of the decorator they all share the same version.
if I read this correctly importing something from the app that is not declared in the dependencies of the app should not work. while putting Embroider aside for a second, I can 100% say that it does work for all of the packages we're using from what that allows us to do is have only 1 internal addon that manages the versions of a dozen or so packages and the other apps only depend on that internal addon for updates. this also ensures that we avoid packages overriding themselves with different versions in the monorepo. for clarity the lodash-es package mentioned above is declared only in the addon as a dependency but used from the apps |
in _applyDecoratedDescriptor code of the component in built version the decorator is undefined for 0.1.4 and it works for 0.1.3
setup is ember-cached-decorator-polyfill declared as a 'dependency' in a shared addon
decorator used in app that includes the shared addon.
I can create a reproduction if required, but I can confirm it used to work on version 0.1.3
The text was updated successfully, but these errors were encountered: