Open patocallaghan opened 4 years ago
Hi @patocallaghan, I've been talking about this with @ef4 since the early days of Embroider.
Ember Observer has the capability to do both static (in the form of anything that can be written as an eslint rule) and dynamic (in the form of anything that can be expressed as an ember-try scenario) checks.
Unfortunately, it's a bit tricky to test addons for this capability (vs Ember version compatibility that only requires changing a dependency) because testing Embroider against an addon requires changes to the addon's ember-cli-build.js
.
If we could manage an ember-try scenario for Embroider that would fail without the code in ember-cli-build.js
being present, any addons without that code could be considered incompatible.
That makes sense 👍 and I imagine we can't really just make those modifications ourselves in an ember try run because technically they could be doing anything in there?
Is there another option where we let addon authors specify their own compatibility using some keywords somewhere? possibly in the package.json?
Yep.
It's a possibility. There's some definition of that here https://github.com/emberjs/rfcs/blob/master/text/0507-embroider-v2-package-format.md#definitions but I think it would be preferable to have Ember Observer actually testing for Embroider safety.
This may be early days for this but worth considering. As there is now a plan for addons and how they can be compatible with Embroider would it be worth adding their Embroider compat level to addon's sidebar?
Not entirely sure how we'd determine this, whether it be done dynamically or statically but I guess we have prior art there with the Ember version compat.