Skip to content

Upgrade to Rush 5 - #6242

Merged
Micah Godbolt (micahgodbolt) merged 28 commits into
masterfrom
pgonzal/upgrade-to-rush-5
Sep 12, 2018
Merged

Upgrade to Rush 5#6242
Micah Godbolt (micahgodbolt) merged 28 commits into
masterfrom
pgonzal/upgrade-to-rush-5

Conversation

@natalieethell

@natalieethell Natalie Ethell (natalieethell) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change

Description of changes

Upgrade OUFR to use Rush 5. This also removes the phantom node_modules folder from the root directory.

We will need a corresponding change to all the build definitions in VSTS.

Focus areas to test

I tested that the precommit hooks still work as expected.

Microsoft Reviewers: Open in CodeFlow

// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See the @microsoft/rush package's LICENSE file for license information.
Object.defineProperty(exports, "__esModule", { value: true });
// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED.

@cliffkoh Cliff Koh (cliffkoh) Sep 5, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What tool generates this? #Resolved

@natalieethell Natalie Ethell (natalieethell) Sep 5, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is generated by Rush itself #Resolved

@cliffkoh

Copy link
Copy Markdown
Contributor

Looks like we will need a corresponding change to all the build definitions in VSTS. Incidentally, why is install-run-rush needed now, do you know? Would the old approach no longer work?

@cliffkoh

Cliff Koh (cliffkoh) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor

Natalie Ethell (@natalieethell) can you test and ensure that the precommit hooks still work? (Prettier in particular) #Resolved

@cliffkoh

Cliff Koh (cliffkoh) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor

Looking at the commit log, it seems the change here (which will require corresponding changes to VSTS definitions) is to avoid a "phantom" node_modules folder - what does "phantom" here specifically refer to? #Resolved

@natalieethell

Natalie Ethell (natalieethell) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor Author

Cliff Koh (@cliffkoh) from what I gathered from Pete, it seems like we're trying to avoid using anything in the root node_modules, since that is a phantom folder and Rush aims to protect against phantom dependencies. So, he put in the install run rush script instead. Is there another approach you can think of that avoids using rush from the root node_modules folder? #Resolved

@natalieethell

Natalie Ethell (natalieethell) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor Author

(If my understanding is correct) Rush's symlinking model aims to eliminate the phantom dependencies that could be introduced by the root node_modules folder, where phantom dependencies refer to broken imports or mismatched versions when someone else installs an OUFR package. With these, you could accidentally import a library that was missing from package.json. #Resolved

@cliffkoh

Cliff Koh (cliffkoh) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor

Gotcha. That said, we still have a root node_modules folder... this change doesn't actually remove it... #Resolved

@natalieethell

Natalie Ethell (natalieethell) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor Author

Right! We're looking to remove it, but we're still looking to solve other issues that come up first. If there aren't too many and removing the node_modules folder isn't too involved, we'll do it. Otherwise, we can suppress the Rush warning. #Resolved

@natalieethell

Natalie Ethell (natalieethell) commented Sep 5, 2018

Copy link
Copy Markdown
Contributor Author

(This PR still needs some work) #Resolved

@cliffkoh

Copy link
Copy Markdown
Contributor

Before you (or anyone else) hit the merge button, please make sure to sync with myself and Ken Chau (@kenotron) so we can make sure to update the corresponding build definitions in VSTS (demo deploy and the release build).

@kenotron Ken Chau (kenotron) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm also looking for maybe some updates to some parts of our readme or something because rush now has some new commands like rush update instead I think.

Comment thread package.json
@natalieethell

Natalie Ethell (natalieethell) commented Sep 6, 2018

Copy link
Copy Markdown
Contributor Author

It looks like rush update updated the react-test-renderer version from 16.4.2 to 16.5.0 and the enzyme version from 3.5.1 to 3.6.0, which is now not including undefined values in the snapshots, and therefore causing the snapshot tests to fail. I'll update those.

(jestjs/jest#6162 for reference) #Resolved

@natalieethell

Copy link
Copy Markdown
Contributor Author

I checked all of the following commands using install-run-rush.js in package.json:

_rushInstall, _rushBuild, _rushBuildToFabric, _rushRebuild, _rushRebuildCi, _rushRebuildFast, code-style, change, generate, and the new update.

They seem to all work as expected.

@octogonz

Copy link
Copy Markdown

Thanks a bunch Natalie Ethell (@natalieethell) for getting this working! :-D

@natalieethell

Natalie Ethell (natalieethell) commented Sep 12, 2018

Copy link
Copy Markdown
Contributor Author

Doing some final checks myself before merging. Do not merge yet.

@natalieethell

Copy link
Copy Markdown
Contributor Author

Looks good on my end!

@micahgodbolt

Copy link
Copy Markdown
Member

just waiting for passing build and ill merge

@natalieethell

Copy link
Copy Markdown
Contributor Author

Thanks Micah! Also just added notes to the wiki: https://github.com/OfficeDev/office-ui-fabric-react/wiki/Rush-5-Change-Notes

@msft-github-bot

Copy link
Copy Markdown
Contributor

🎉@uifabric/fabric-website@v6.4.4 has been released which incorporates this pull request.:tada:

Handy Links:

@cliffkoh
Cliff Koh (cliffkoh) deleted the pgonzal/upgrade-to-rush-5 branch September 13, 2018 17:52
@jordandrako

Copy link
Copy Markdown
Contributor

So it seems we can no longer run global rush commands.
rush build -t fabric-website no longer works correctly for me, but npm run _rushBuild -- -t fabric-website does. Was this an intended/known side-effect?

@micahgodbolt

Copy link
Copy Markdown
Member

Jordan Janzen (@jordandrako) I assume you have rush 5.x installed?

@jordandrako

Copy link
Copy Markdown
Contributor

Latest, so 5.2.1. I double checked by running npm i -g @microsoft/rush@latest. Sorry, it seems I had a weird issue I can't reproduce anymore, but it wasn't working at all unless I just used the npm script. It seems to work today.

@octogonz

Pete Gonzalez (octogonz) commented Sep 19, 2018

Copy link
Copy Markdown

Latest, so 5.2.1. I double checked by running npm i -g @microsoft/rush@latest. Sorry, it seems I had a weird issue I can't reproduce anymore, but it wasn't working at all unless I just used the npm script. It seems to work today.

If you encounter it again and can provide a repro, the Rush developers would be happy to help investigate. We definitely want this to be a good experience. :-)

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.