-
Notifications
You must be signed in to change notification settings - Fork 142
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
Ensure style compilation works properly with ember-cli >= 3.18 #934
Conversation
70da86c
to
e01cc59
Compare
These tests haven't been ported to scenario-tester yet, which is why we didn't see this sooner. |
e01cc59
to
44178da
Compare
…ange Ember 3.18 moves add-on styles into `<addon-name>/__COMPILED_STYLES`, this isn’t compatible with embroider, so we move it back…
44178da
to
13b587d
Compare
@@ -97,6 +99,11 @@ export default class V1App { | |||
return dirname(emberCLIPackage); | |||
} | |||
|
|||
@Memoize() | |||
get hasCompiledStyles() { | |||
return semver.gte(JSON.parse(readFileSync(`${this.emberCLILocation}/package.json`, 'utf8')).version, '3.18.0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue I'm open to suggestions to detecting this in a different way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya this seems good to me, especially since we already have the this.emberCLILocation
setup
@@ -738,6 +738,21 @@ export default class V1Addon { | |||
private buildAddonStyles(built: IntermediateBuild) { | |||
let addonStylesTree = this.addonStylesTree(); | |||
if (addonStylesTree) { | |||
if (this.app.hasCompiledStyles) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather then detected this for each add-on, i memoize the result on the app instance and reuse said result for each addon's addon styles
@@ -14,7 +14,7 @@ | |||
"broccoli": "^3.4.2", | |||
"console-ui": "^3.0.0", | |||
"ember-auto-import": "^1.2.21", | |||
"ember-cli": "~3.17.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is green, I would like to test bumping this to latest. I have chosen the most conservative bump to minimize variables as I resolve the issue at hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've bumped to latest and everything remains green
Now that this is green, let me try to bump all the |
Co-authored-by: Robert Jackson <rjackson@linkedin.com>
Bump test-packages/support’s to known failing version of ember-cli for debugging.
I'm using this PR to help narrow down specific CI failures across platforms.
(context: this is an exploratory fix for -> #927)
[fixes #927]