Once you update, the deprecations turn into errors, as you said
Yep these can be accessed via the injected properties of components, or by importing the Site and User modules from discourse/models/user and discourse/models/site
For my plugin that Iām developing and running ./bin/ember-cli I have nothing to worry about, since, Iām using ember-cli.
But my concern is the dozens or hundreds of people who arenāt going to find out about this until itās too late, someone who doesnāt know javascript from CSS or a plugin from a theme component, they donāt need to worry unless they have javascript in a theme component.
What I would like is a simple test so that they know whether they should have anything to worry about. For those people, Iāll recommend that they spin up a new server, restore their database and see if anything explodes. Right?
Or should they just turn on EMBER_CLI_PROD_ASSETS: 1, do a rebuild and if it explodes, turn it back off, and then spin up a new server to fix it.
. . . Unless youāve spent the past year developing a tool to make it āeasyā to spin up new servers?
So what will happen for those who donāt pay any attention to this stuff is that itāll break when the ember-by-default window hits and then they can turn off that ENV variable for another month or two (and presumably fix it) before that doesnāt work anymore.
The check in the code seems to be unchanged but Iām not very familiar with Ruby. Will a boolean conditional with ENV['EMBER_CLI_PROD_ASSETS'] use the value of that key or will it be true if that key exists?
If itās the latter, the answer might be to remove EMBER_CLI_PROD_ASSETS from the yml rather than set it to 0.
None of my issues had to do with ember-cli, but with my own misconfiguration, since this was a 2-container installation and web_only.yml didnāt get updated when standalone.yml was. Hereās a PR:
Ember CLI is now the default for all installations of Discourse. When you next update (either via the /admin/upgrade UI, or via ./launcher rebuild app), you will be automatically switched to Ember CLI.
Weāre now running Ember CLI in the majority of our managed hosting, so we donāt expect any major issues. But if you notice anything, please do make a topic here on Meta and weāll investigate.
I rebuilt a site yesterday that failed due to ember CLI and fixed it by removing EMBER_CLI_PROD_ASSETS=1.
At one point early on I tried to disable the ember cli by setting EMBER_CLI_PROD_ASSETS=0 and Iām pretty sure that it still included ember_cli and someone told me that you couldnāt disable it by setting it to 0 (which didnāt make sense, but seemed to be true).
This is a bit challenging for self-hosters who have old themes and never look at the javascript console.
That was true, but I fixed the logic with this latest commit so that =0 works as expected. That said, we intend to totally rip out the ālegacyā environment in a matter of weeks, so please donāt use =0 unless itās on an extremely short-term basis.
Weāve added backwards compatibility for the most common errors we saw across our hosting. For example this commit a couple of weeks ago added backwards-compatibility for Discourse.User and Discourse.SiteSettings. This commit fixed up some issues for themes with non-standard initialization processes.
We want to make this rollout as smooth as possible, so if youāve run into errors in the last week-or-so, please do let us know the precise error, and the code which caused it.
Oh. Hooray. That makes sense. (It works like I thought it should all along. And Iām not crazy for remembering that I was told it didnāt work how I thought it should. These are great things!).
I find it really hard to figure that out (likely due to ignorance). When I click the thing that I think should show me whatās causing the error, what I get is the code that appears to be the code that tests for the deprecation, not the code that exibits it. Iāll endeavor to send some example(s) soon.
If you need a hand figuring it out, a support topic with a screenshot of the error would be a good starting point - then we can help with debugging from there. Chances are, someone else has seen a similar error, and may recognise the symptoms.
And now for the final step of this saga: the legacy build system is now disabled. All Discourse installs will compile assets using Ember CLI.
This change will only affect people who had deliberately set EMBER_CLI_PROD_ASSETS=0 in their config. In that case, a warning will be printed during the build, and Ember CLI will be used.