-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Get rid of ember install #453
Comments
|
...or to create configuration files, etc. |
I agree that ember install is a confusing extra addition to the learning experience, especially since It also papers over the difference between This additional tooling is one of the weirdly heavy parts of adopting ember when you're already an experienced user of other JS frameworks. |
I am not saying this statement is wrong and I sonewhat agree with it, but sometimes the dependency needs to be defined in the host app, like with peer dependencies. |
Could running the blueprint also happen with npm postinstall? |
The semantics of postinstall are quite different. postinstall is ran every time you |
How is it a hurdle, please explain? It removes the need for every addon to have examples like:
Ya, I think this is the only thing to change here. Making |
npm docs mention that the postinstall script is ran "after the package is installed": https://docs.npmjs.com/misc/scripts The way you phrased it makes it sounds like anytime you install something, postinstall script will run. Please correct me if I'm wrong. |
@rwjblue you and @locks convinced me thoroughly that #448 was necessary because NPM was already the community default. In that case I would argue that addons do not need to provide instructions for yarn, anyone choosing to use yarn will be able to do so, and the extra instructions are just noise. The hurdle is in learning anything here at all. |
@miguelcobain right, but if you delete your |
On a higher note, I think it would be really great to align with the larger JS community and treat ember addons more like regular npm packages. The special sauce of an addon is the merge behavior at build time, and we would still have that. |
There are 1,077 that have |
A significant portion do, and the functionality that the default blueprint provides in these cases is not easily replicated through other means. Just randomly scrolling through the top addons on Ember Observer, at least 3 of the top 25 use a default blueprint. Personally, I'm quite sympathetic to the idea that dropping things like However, there are concrete, significant benefits |
Perhaps there is a way to have a (default) For example, creating a new addon would result in a pre-defined |
The blueprint process is great for first installs, but breaks on updates so while it is amazing I don't see it as a blocker in it's current state. Maybe moving to a more standard postscript process would open up some options for managing the complication of blueprint changes being applied to the app when updated. |
I can agree that the default blueprint is powerful at first, but quickly gets into a weird state.
There's probably a better way to do this, and it might be in-line with the current discussion. |
Not in a position to research this myself until next week, but in the interest of continuing the conversation, how does the “only run generator once” mechanism work? Is there a cache file somewhere or does it detect files in the project? Couldn’t that same mechanism be used by the postinstall script? Couldn’t the |
|
I like |
I think it's totally fine and acceptable for Ember users to run
Oh nice, good to know! Was not aware of that hook until now.
Maybe a migration path / community convention could be something like I get that installing the default blueprint automatically on install is a nice convenience, but I am not sure that copy pasting 2 lines out of a README is that much more of a hassle than copying 1 line. I think it would be one less thing for new teammates to learn and remember. |
Fwiw a lot of this discussion has focused on how the postinstall script runs for every fresh install. A non-trivial point lost in that is that every fresh checkout of a project or CI run is going to be an install. That said it’s probably relatively straightforward for ember-cli to provide a cache file for whether a default blueprint has been run ever before. A default addon postinstall script would ask that cache before running the blueprint. Everything after the initial would need to be a manual “ember g”. |
I'm wondering if we could take it a step further and provide a public hook for addon authors to decide when the blueprint should run (once, upon every install, after major upgrades, NOT for CI runs, etc.). It should probably default to "once" since that's the current action. |
Just want to note that
But in reality it does this:
This is why the command may not work in lerna and why I think that the command isn't just a dumb 2-step command as most would imply. Please correct me if I'm wrong |
This issue seems to be stagnant now though the underlying issue still stands. I think there's a good case for standardizing the install process and I, personally, don't mind making it two step to make the package manager explicit. However, @mikkopaderes brings up a good concern here. If someone wants to think through this a bit more I don't think it would be hard to write an RFC. Remember, not everything has to be finalized for a draft. |
an RFC was just opened for this today! #831 🥳 |
Just a clarification, #831 focuses on only |
I’m not entirely clear why we have ember install, but it seems like it just narrows the search for packages by the ember-addon keyword?
Regardless, I think it’s an unnecessary learning hurdle and we should just use npm/yarn to install packages.
(Tangentially related, ember-auto-import has also probably reduced some of the value add of addon packages, meaning that more packages are probably being installed directly now).
The text was updated successfully, but these errors were encountered: