Comments (6)
Yes, I believe you can remove it. As you say, newly generated apps do not have ember-classic-decorator
but also have working JSONAPIAdapters.
from ember-classic-decorator.
I just encountered this on 3.28 with 3.0 of classic decorator for adapters. I followed the trail back into ember-data and JSONAPIAdapter extends RestAdapter which includes a mixin, so it seems to be correct for that case. Have you followed your ApplicationSerializer inheritance back?
from ember-classic-decorator.
@kategengler I have also just experienced this when extending from my ApplicationAdapter
which extends from JSONAPIAdapter
. Strangely I don't get the error on ApplicationAdapter
extending from JSONAPIAdapter
, but I do get the error when I extend from ApplicationAdapter
.
I also followed the trail back and I see what you are saying about RestAdapter
and the mixin....so are you suggesting that this is expected behavior? The only reason it seems odd to me is that we are using "ember-data": "~4.4.0"
with "ember-source": "~4.4.0"
and in new CLI outputs for 4.4.0, the classic decorator package is not included. It seems odd to have an app-breaking error in this case. If I reduce all other usage of the @classic
decorator to this one instance in my app, do I have to keep using it until another version of Ember Data is released?
Thanks so much for your help in clarifying!
from ember-classic-decorator.
I don't believe ember-classic-decorator
was ever default (ever in the blueprints).
I believe that when using this addon, that error is correct and the @classic
decorator is warranted, because it is ultimately a classic-style class.
If you don't have this addon in your app, this error should not occur and everything should work, since this addon is dev-only and for guidance upgrading only.
I cannot explain why it doesn't happen in the ApplicationAdapter
.
from ember-classic-decorator.
@emberjs/ember-data-core any ideas?
from ember-classic-decorator.
Thanks so much!! I think my main confusion was that our upgrade path was to reduce the usage of ember-classic-decorator
to zero without errors before finally removing it as a dependency.
Just to extra confirm for anyone else stumbling on this issue: Are you saying that if this is the last instance in our app where the error is thrown (because of extending framework-supplied JSONAPIAdapter
and JSONAPISerializer
), we can safely remove the addon altogether? From a consumer standpoint, we don't need to care about the inheritance back to RestAdapter
being classic and we can write code using only Octane/native-class syntax? (Assuming we are using the public APIs and not being hacky with internals)
from ember-classic-decorator.
Related Issues (20)
- Installing `ember-classic-decorator` "breaks" the `@ember/string` deprecation warning HOT 1
- Not working on Ember 5 HOT 5
- Embroider incompatibility HOT 3
- Observer conversion HOT 2
- Non-default resolver can cause bugs
- Install error _1.MacrosConfig.astPlugins is not a function HOT 1
- Conflicting versions of `@embroider/macros` with `ember-exam`
- Use of global require can cause conflicts with 3rd party AMD-based scripts
- Deprecation warnings with Ember 3.27 HOT 4
- Breaks if user is shadowing `window`
- errors when extending a service with a constructor HOT 11
- Does not work with `ember-cli-deprecation-workflow` v2 HOT 1
- Ember-data classes no longer recognized on Ember 3.27 or later HOT 3
- Incremental adoption
- ember-concurrency task lint error
- Generates broken code in production HOT 2
- Can't inherit models HOT 2
- ESLint rules totally broken on TypeScript 4.8.2 HOT 1
- `isTesting` from `@embroider/macros` returns false in tests if `ember-classic-decorator` is a devDependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-classic-decorator.