Skip to content
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

Update CI to Ember 2.18+ #343

Merged
merged 6 commits into from
Dec 9, 2021
Merged

Update CI to Ember 2.18+ #343

merged 6 commits into from
Dec 9, 2021

Conversation

mixonic
Copy link
Contributor

@mixonic mixonic commented Dec 7, 2021

A patch to start v3 on master. Will support Ember 2.18.0 through latest, will support Node 14+.

If this lands, we should also start a release-2 branch for patches back to 2.x.

@mixonic mixonic force-pushed the prerelease-3 branch 8 times, most recently from 7f1a139 to a184b64 Compare December 7, 2021 22:03
@mixonic
Copy link
Contributor Author

mixonic commented Dec 7, 2021

Cool, this is basically proven out. With no real changes other than bumping ember-cli-htmlbars, Ember 3.28 support (for CI at least) is unblocked. I'd like to look through #335 and see what can be backported to see if we can retain Ember 2.18 support while unblocking Ember 4. It seems possible.

@mixonic
Copy link
Contributor Author

mixonic commented Dec 9, 2021

Alright! I've gone through a number of failures and looked at #335 in detail as well. This is getting close though I've still got a failure.

This evening I backported four patches which can safely land on master (and even make master / v2 a bit nicer for anyone using them in later Ember versions). Those patches are:

That is all released in v2.1.0.

The content of what remains in this branch/patch is:

@mixonic mixonic force-pushed the prerelease-3 branch 8 times, most recently from 8541c61 to 2fd5744 Compare December 9, 2021 16:46
@mixonic mixonic mentioned this pull request Dec 9, 2021
@mixonic mixonic force-pushed the prerelease-3 branch 3 times, most recently from 3b4f9cf to bb22f44 Compare December 9, 2021 18:19
@mixonic mixonic force-pushed the prerelease-3 branch 4 times, most recently from 5f47f15 to 2e29799 Compare December 9, 2021 19:17
@mixonic mixonic marked this pull request as ready for review December 9, 2021 19:23
mixonic and others added 6 commits December 9, 2021 16:47
When compiling with `compileModules: false`, ember-cli-babel defaults to
using the modules polyfill, since it assumes we are concatenating the
output script using `app.import` without an AMD wrapper.

This does not apply to us, since we are compiling the `-private` modules
into a single AMD module (via rollup below), which can in fact have
external dependencies.

We can opt-out of this with `disableEmberModulesAPIPolyfill: true`. In
Ember versions with "real modules", that is what we want in order to
avoid the Ember global deprecation (or just completely not working in
4.0+).

It seems like the intent may have been that we should be able to set
this to `true` unconditionally, and `ember-cli-babel` will ignore this
setting if the Ember verion requires the modules API polyfill. However,
presumably due to a bug, ember-cli-babel actually checks for this value
first and return out of the function early if its value is truthy. This
means that if we set this to true unconditionally, then we would have
disabled the modules polyfill for Ember versions that needs it, which
would be incorrect. Therefore, we have to duplicate the detection logic
here in order to set this value appropriately.

Ideally, we should just stop trying to rollup the -private modules and
let the modern build pipeline optimizes things for us, then none of this
would have been necessary.
@mixonic
Copy link
Contributor Author

mixonic commented Dec 9, 2021

Ok, green and landing it. I'll cut 3.0.0-0 from master after the merge.

Thanks @rwwagner90 @chancancode @johanrd for the illustrative work on #335. That was a powerful guide. I think most of the critical components from that PR are represented here, the biggest difference in lines being that this PR doesn't attempt to change the linting and code style. I'd love to work with you on getting any of that landed as incremental changes on the main branch.

@mixonic mixonic merged commit 3343ecc into master Dec 9, 2021
@mixonic mixonic deleted the prerelease-3 branch December 9, 2021 22:32
@mixonic
Copy link
Contributor Author

mixonic commented Dec 9, 2021

3.0.0-0 has been released, and a release-2 branch for legacy v2 support has been created.

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.

2 participants