Skip to content

Update ember-cli and fix failing tests#16465

Merged
rwjblue merged 1 commit intoemberjs:masterfrom
GavinJoyce:gj/update-ember-cli
Apr 6, 2018
Merged

Update ember-cli and fix failing tests#16465
rwjblue merged 1 commit intoemberjs:masterfrom
GavinJoyce:gj/update-ember-cli

Conversation

@GavinJoyce
Copy link
Member

@GavinJoyce GavinJoyce commented Apr 4, 2018

In order to continue working on MU Blueprints, we need to update the ember-cli version that we're using in ember.js.

The output of ember new has since been changed to emit new style tests. These changes result in a number of failing ember.js tests. For example, the destroyApp helper no longer exists on disk so the default generated test format output has changes for a bunch of ember generate blueprints.

I've updated the existing tests to expect the new default output and I've pinned ember-cli at this SHA.

I've also removed ember-cli config caching which was also causing failing tests ember-source

@GavinJoyce GavinJoyce changed the title [WIP] update ember-cli [WIP] update ember-cli and failing tests Apr 4, 2018
@rwjblue
Copy link
Member

rwjblue commented Apr 4, 2018

Are we happy to continue testing the (updated) default generator output as before and live with similar to the existing gaps in our coverage?

Yes.


describe('with usePods=true', function() {
//TODO: GJ: figure out what changed here
describe.skip('with usePods=true', function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@GavinJoyce GavinJoyce Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, a git bisect points to ember-cli/ember-cli@5d5801a. I'm not yet clear why though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is due to caching 🤔

Copy link
Member Author

@GavinJoyce GavinJoyce Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, there are some details on this in the previous PR: ember-cli/ember-cli#7491 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in general that the caching is fine, we just need an escape hatch to bypass and reset...

tldr; cache invalidation is hard

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patocallaghan @rwjblue perhaps we could revert the feature for now? It looks like we haven't announced it yet. This will unblock MU blueprints and allow us time to come back and add a more robust implementation of the feature

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GavinJoyce I wasn't aware that the tests had been moved elsewhere, I just thought they'd been deleted.

I had a look there and I remember it being quite tricky to make those particular tests work with get-config. The config had already been cached at the module level and the replaceFile logic in the test happened too late. It wasn't easy to "reach in". In other tests that tested this sort of thing we used multiple fixture directories so it worked fine.

We're not actually using this feature ourselves yet so if it unblocks your MU work I'm fine for the changes to be reverted for now.

@rwjblue any thoughts? another option is to remove the cache but I believe the instrumentation lib will call getConfig a lot which will result in lots of Yam objects being created.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to cache there, it was just a "nice to have". Though its possible I am missing a caveat of the other changes that may have required caching...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GavinJoyce GavinJoyce changed the title [WIP] update ember-cli and failing tests Update ember-cli and failing tests Apr 6, 2018
@GavinJoyce
Copy link
Member Author

@rwjblue this is now 🍏 and ready for review


import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop'; <% } %>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run is already imported above

@GavinJoyce GavinJoyce changed the title Update ember-cli and failing tests Update ember-cli and fix failing tests Apr 6, 2018
@rwjblue rwjblue merged commit 9e14ea2 into emberjs:master Apr 6, 2018
@rwjblue
Copy link
Member

rwjblue commented Apr 6, 2018

Thank you @GavinJoyce!

@GavinJoyce GavinJoyce deleted the gj/update-ember-cli branch April 6, 2018 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants