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

Tracking remaining usage of the Ember global #19506

Closed
3 tasks done
sandydoo opened this issue Apr 24, 2021 · 11 comments
Closed
3 tasks done

Tracking remaining usage of the Ember global #19506

sandydoo opened this issue Apr 24, 2021 · 11 comments

Comments

@sandydoo
Copy link
Contributor

sandydoo commented Apr 24, 2021

With #19357 landing, there are a few deprecation notices being thrown even in brand new apps on 3.27-beta-1+.

Here’s a list:

Steps to reproduce

Run ember new with ember-cli@3.27.0-beta.1. Inspect the console.

Relevant versions

ember-cli: 3.27.0-beta.1
ember-source: 3.27.0-beta.3
ember-data: 3.27.0-beta.0
ember-cli-htmlbars: 5.7.1
@embroider/compat: 0.39.1
@embroider/core: 0.39.1
@embroider/webpack: 0.39.1
@sandydoo sandydoo changed the title Tracking remaining usages of the Ember global Tracking remaining usage of the Ember global Apr 26, 2021
@pzuraq
Copy link
Contributor

pzuraq commented Apr 26, 2021

@sandydoo can you confirm that the first issue is still a problem? That is specifically caused by ember-cli-htmlbars, since it is the addon responsible for compiling templates, and should have been resolved by this PR: ember-cli/ember-cli-htmlbars#683

If that's still an issue, we definitely need to take a look into it.

@sandydoo
Copy link
Contributor Author

sandydoo commented Apr 26, 2021

@pzuraq, I did some more testing.
So the first issue only happens in Embroider builds. I think the line const createTemplateFactory = Ember.HTMLBars.template; is Webpack doing its thing, simplifying import { createTemplateFactory } from '@ember/template-factory';. I assume there is some way to tell Webpack not to do this?

To be fixed by embroider-build/embroider#785

@sandydoo
Copy link
Contributor Author

The second issue is coming from @embroider/compat. I’ll take it up over there.

What about the last one?

@pzuraq
Copy link
Contributor

pzuraq commented Apr 27, 2021

I thought we tried to get rid of the Namespace stuff, I'm unsure why we had to keep it in the end. It's odd that tests pass too, even with it. I'll dig in soon.

@simonihmig
Copy link
Contributor

I am seeing a huge number of false positives triggering this deprecation. I understand this is related to not having the latest version of https://github.com/ember-cli/babel-plugin-ember-modules-api-polyfill (which is a dependency of ember-cli-babel). But this is very easy to get into, when you are not updating your lock file, or have other addons that still depend on older versions where things like npx yarn-deduplicate won't fix this.

Just wanted to mention this here, as we can expect a lot of users will run into this...

@rwjblue
Copy link
Member

rwjblue commented Apr 30, 2021

@simonihmig - Yes, true. Folks not doing relatively routine lock file maintenance have no way to update to get our fixes. I'm not 100% sure what we can do about it though. 🤔

@pzuraq
Copy link
Contributor

pzuraq commented Apr 30, 2021

@sandydoo the final issue should have been fixed by #19509, we removed the namespace processing entirely. That fix should be backported to beta in the next release.

@MelSumner
Copy link
Contributor

@pzuraq do you consider this issue resolved?

@sandydoo
Copy link
Contributor Author

sandydoo commented May 13, 2021

@MelSumner, technically, yes, but the Ember-specific fix (#19509) never made it to 3.27. So with the Ember global deprecation enabled in 3.27 (#19457), you now end up with a wall of deprecation notices even in brand new apps. That’s why I was waiting for a release before closing.

@pzuraq
Copy link
Contributor

pzuraq commented May 14, 2021

@sandydoo that bugfix was backported to 3.27: https://github.com/emberjs/ember.js/commits/v3.27.0

Are you still seeing this issue?

@sandydoo
Copy link
Contributor Author

@sandydoo that bugfix was backported to 3.27: v3.27.0 (commits)
Are you still seeing this issue?

@pzuraq, you’re totally right! My bad, @MelSumner! Thanks, everyone!

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

No branches or pull requests

5 participants