New installs will default to Ember CLI builds in Production

The important part of my sentence was:

Once you update, the deprecations turn into errors, as you said :+1:

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

5 Likes

Ah yes, useful alternative to passing them through helpers as parameters.

4 Likes

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.

5 Likes

I guess you could query to see if there are any theme_fields with the html or js type:

That would work, but setting up a whole new server seems like a lot of effort. Instead, I would recommend:

  1. Open your dev tools console, and look for yellow deprecation notices
  2. Fix them
  3. Upgrade to Ember CLI (or just wait until we roll it out by default)
2 Likes

. . . Unless you’ve spent the past year developing a tool to make it “easy” to spin up new servers? :wink:

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.

4 Likes

I restored a backup to a new site that has Kanban theme enabled and it’s getting errors (I reported it on the kanban topic), I tried setting

EMBER_CLI_PROD_ASSETS: 0

and rebuilds are still saying:


Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

which I (think I) recognize as coming from ember-cli. Is there some way to disable it on new sites?

If I rebuild an old site is it going to get the new base image and not be able to disable ember-cli?

1 Like

Is that a typo in your message here or a typo in your yml? It should read EMBER_CLI_PROD_ASSETS: 0

2 Likes

Thanks! But yes, that’s a typo, but I got it right in the yml file. I just copy/pasted it correctly in the OP.

1 Like

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.

1 Like

That won’t work, you need to remove the line.

1 Like

. . . wait . . .

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:

4 Likes