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

Upgrade to Rush 5 #6242

Merged
merged 28 commits into from
Sep 12, 2018
Merged

Upgrade to Rush 5 #6242

merged 28 commits into from
Sep 12, 2018

Conversation

natalieethell
Copy link
Contributor

@natalieethell natalieethell commented Sep 5, 2018

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.
Copy link
Contributor

@cliffkoh cliffkoh Sep 5, 2018

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

Copy link
Contributor Author

@natalieethell natalieethell Sep 5, 2018

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
Contributor

cliffkoh commented Sep 5, 2018

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
Copy link
Contributor

cliffkoh commented Sep 5, 2018

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

@cliffkoh
Copy link
Contributor

cliffkoh commented Sep 5, 2018

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
Copy link
Contributor Author

natalieethell commented Sep 5, 2018

@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
Copy link
Contributor Author

natalieethell commented Sep 5, 2018

(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
Copy link
Contributor

cliffkoh commented Sep 5, 2018

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

@natalieethell
Copy link
Contributor Author

natalieethell commented Sep 5, 2018

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
Copy link
Contributor Author

natalieethell commented Sep 5, 2018

(This PR still needs some work) #Resolved

@cliffkoh
Copy link
Contributor

cliffkoh commented Sep 5, 2018

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

Copy link
Member

@kenotron kenotron left a comment

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.

package.json Show resolved Hide resolved
@natalieethell
Copy link
Contributor Author

natalieethell commented Sep 6, 2018

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
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

Thanks a bunch @natalieethell for getting this working! :-D

@natalieethell
Copy link
Contributor Author

natalieethell commented Sep 12, 2018

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

@natalieethell
Copy link
Contributor Author

Looks good on my end!

@micahgodbolt
Copy link
Member

just waiting for passing build and ill merge

@micahgodbolt micahgodbolt merged commit f425097 into master Sep 12, 2018
@natalieethell
Copy link
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
Contributor

🎉@uifabric/[email protected] has been released which incorporates this pull request.:tada:

Handy Links:

@cliffkoh cliffkoh deleted the pgonzal/upgrade-to-rush-5 branch September 13, 2018 17:52
@jordandrako
Copy link
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
Member

@jordandrako I assume you have rush 5.x installed?

@jordandrako
Copy link
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
Copy link

octogonz commented Sep 19, 2018

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 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.