microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.82k stars 594 forks source link

[rush] Rush init should use newer versions? #1475

Open halfnibble opened 5 years ago

halfnibble commented 5 years ago

Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.

Is this a feature or a bug?

Please describe the actual behavior. Running rush init will create a rush.json file with presently installed version of rush and pnpm version 2.15.1.

If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.

rush init

What is the expected behavior? Should this create a new rush project with the latest available version of rush? Or does it make sense to use the currently installed version?

Also, should we update this template to use a newer version on pnpm?

After further discussion, we should do the following:

octogonz commented 5 years ago

Here's one more issue:

If you run rush init --overwrite-existing in an existing Rush folder, it will use the version from rush.json even if a newer version is installed globally. The main point of that feature is for upgrading a repo, so the behavior is super annoying and certainly a bug.

So I'd propose the following

octogonz commented 4 years ago

In this Gitter conversation we discussed introducing a new binary myrush that invokes your globally installed Rush version (bypassing the version selector that would normally invoke the version specified in rush.json).

With this feature, you could use myrush init --overwrite-existing to upgrade a repo to your locally installed version of Rush.

octogonz commented 4 years ago

Issue https://github.com/microsoft/rushstack/issues/1073 pointed out that the error message The "rush init" command must be run in a new folder without an existing Rush configuration. could be more helpful -- in its current form it's not obvious to users how they are supposed to upgrade their repo. We should tackle these problems together.

I apologize for the lack of progress on PR https://github.com/microsoft/rushstack/pull/1771. I'll see if I can make some time to push it along. This is a core user scenario we're trying to improve, and (hopefully) a relatively easy fix.