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

[ENHANCEMENT] install:addon command will show a deprecation message before running the install command. #3854

Merged

Conversation

DanielOchoa
Copy link
Contributor

Given that a lot of ember-cli addon projects tell you to install them through the ember install:addon command, I re-added the command so it can throw a friendly error that points to the now correct command ember install. This is related to #3598 (comment).

@stefanpenner
Copy link
Contributor

👍

@rwjblue
Copy link
Member

rwjblue commented Apr 8, 2015

Typically, a deprecation will still "work" with a warning. In this case, it seems that we just throw a SilentError and the user needs to run the alternate command.

I would prefer that this extended the current install command, and added the deprecation before calling _super in init. That way it doesn't duplicate code to make it work, and isn't annoying to consumers who have to retype their command.

What do y'all think?

@DanielOchoa
Copy link
Contributor Author

You are right, it is not a deprecation but simply a silent error. I like where you are going with this, I'll make the necessary change to extend from the install command.

@DanielOchoa DanielOchoa changed the title [ENHANCEMENT] install:addon command now throws a friendly error when it runs. [ENHANCEMENT] install:addon command will show a deprecation message before running the install command. Apr 8, 2015
@DanielOchoa
Copy link
Contributor Author

Interesting. For some reason init gets called twice. It's not being instantiated two times, it's only the init function being called twice.

Do you have any input on this @rwjblue ?

@raycohen
Copy link
Contributor

any movement on this? we're having to put two different sets of install instructions on our repos

@stefanpenner
Copy link
Contributor

any movement on this?

kicking travis

we're having to put two different sets of install instructions on our repos

Why? Or are you catering to old versions of ember-cli?

this.ui.writeLine(chalk.red(warning));

if (this._super.init) {
this._super.init();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this._super.init.call(this);

@stefanpenner
Copy link
Contributor

Interesting. For some reason init gets called twice. It's not being instantiated two times, it's only the init function being called twice.

Do you have any input on this @rwjblue ?

this is most likely the result of us still being on a broken version of core-object. #3056 sorta stalled, but we should try to re-ignite that effort.

cc @jgwhite

@jgwhite
Copy link
Contributor

jgwhite commented Apr 27, 2015

@stefanpenner yes, yes we should :guilty_face:

@DanielOchoa
Copy link
Contributor Author

I figured as much 😸

@raycohen
Copy link
Contributor

@stefanpenner yes, catering to both...

@DanielOchoa
Copy link
Contributor Author

I'll update the pull request to reflect master ..

…`install` command. Changed the verbage on install-npm.
stefanpenner added a commit that referenced this pull request May 21, 2015
[ENHANCEMENT] install:addon command will show a deprecation message before running the install command.
@stefanpenner stefanpenner merged commit 75a008a into ember-cli:master May 21, 2015
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.

None yet

5 participants