Skip to content

Fix RNTester on Windows - #19974

Closed
gengjiawen wants to merge 7 commits into
react:masterfrom
gengjiawen:feature/RNTester_start
Closed

Fix RNTester on Windows#19974
gengjiawen wants to merge 7 commits into
react:masterfrom
gengjiawen:feature/RNTester_start

Conversation

@gengjiawen

@gengjiawengengjiawen commented Jun 29, 2018

Copy link
Copy Markdown
Contributor

Motivation

Currrent, RNTester can not work on windows.

Test Plan:

pass all current ci.

Release Notes:

[GENERAL] [INTERNAL] [RNTester] - fix RNTester on windows.

@gengjiawen
gengjiawen requested a review from hramos as a code ownerJune 29, 2018 12:10
@gengjiawengengjiawen changed the title [WIP]fix RNTester on windows[WIP]fix RNTester on windows fix https://github.com/facebook/react-native/issues/19654Jun 29, 2018
@gengjiawengengjiawen changed the title [WIP]fix RNTester on windows fix https://github.com/facebook/react-native/issues/19654[WIP]fix RNTester on windows fix #19654Jun 29, 2018
@gengjiawengengjiawen changed the title [WIP]fix RNTester on windows fix #19654[WIP]fix RNTester on windowsJun 29, 2018
@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 29, 2018
@gengjiawengengjiawen changed the title [WIP]fix RNTester on windows[WIP]Fixes https://github.com/facebook/react-native/issues/19654Jun 29, 2018
@gengjiawengengjiawen changed the title [WIP]Fixes https://github.com/facebook/react-native/issues/19654[WIP]Fixes #19654Jun 29, 2018
@react-native-botreact-native-bot added ✅Test Plan Missing Changelog This PR appears to be missing a changelog, or they are incorrectly formatted. labels Jun 29, 2018
@pvdz

pvdz commented Jul 12, 2018

Copy link
Copy Markdown

Hi! Thanks for the PR.

Please split the PR up as it is doing two distinct things under the umbrella of one PR, then consider the following;

  • Removing the : string flow type annotations

This was not an actual fix to #19654, just a workaround for these files.

The actual fix was to update the file path logic in metro-babel-register. Babel inadvertently changed behavior to no longer normalize paths between posix/windows and Metro was unaware of it. As a result the babel-register calls failed and led to syntax errors on windows. This has been fixed since so this change is no longer required at all.

  • Removing packager.sh

This seems relevant to me so it's not entirely clear why you're dropping it. If it's breaking something in Windows please describe what and why dropping this script fixes it. I'm not convinced removing it is the way to go but I could be wrong. For example, you're removing the max-workers command. Wouldn't that make everything run "in band" (so on a single core)? That would be a severe regression.

If you feel this should still be dropped feel free to make a PR for it such that somebody more familiar with this area can take a look.

Thanks

@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

I can split the pr, they are in same pr because I want to fix build problem on windows, which still exists (see #19654).

As for packager.sh, it has to be removed if you want to make it on windows. As for max-workers, I think it can add back.

@gengjiawen
gengjiawenforce-pushed the feature/RNTester_start branch from 3e5a8c7 to 7b2e22cCompareJuly 12, 2018 12:41
@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

@pvdz The metro issue has been around for a month. Can you help on this issue ?

@gengjiawen
gengjiawenforce-pushed the feature/RNTester_start branch 2 times, most recently from ec52f94 to 3589b8fCompareJuly 19, 2018 12:03
@gengjiawengengjiawen changed the title [WIP]Fixes #19654Fixes #19654Jul 19, 2018
@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

@hramos This can be merged.

@gengjiawen
gengjiawenforce-pushed the feature/RNTester_start branch from 3589b8f to bf2a551CompareJuly 19, 2018 15:43
@gengjiawengengjiawen mentioned this pull request Jul 19, 2018
@gengjiawen

gengjiawen commented Jul 20, 2018

Copy link
Copy Markdown
ContributorAuthor

Some clarification:

  • I remove types in some file simply because related file or not flow file.
  • My main fix is refactor current unix-like bash to nodejs script so we can test RNTester on windows.

cc @kelset@hramos@janicduplessis

@hramos

Copy link
Copy Markdown
Contributor

@gengjiawen I'll defer to @pvdz for approval + merging.

@hramoshramos added ✅Release Notes and removed Missing Changelog This PR appears to be missing a changelog, or they are incorrectly formatted. labels Jul 20, 2018
@hramoshramos changed the title Fixes #19654Fix RNTester on WindowsJul 20, 2018
@gengjiawen

gengjiawen commented Jul 20, 2018

Copy link
Copy Markdown
ContributorAuthor

@pvdz Can you merge this pr ? I add some clarification in previous comment.

@pvdz

pvdz commented Jul 23, 2018

Copy link
Copy Markdown

@gengjiawen Can you confirm this is still an issue on Metro 42.2 (depending on a new version of Babel) and RN 0.57 (which should resolve most pending Windows issues)? The error reported in #19654 was almost certainly caused by the Babel regression that has been fixed by now.

As for this PR, it still drops typing that we want to keep and it still drops a shell script we want to keep so those points have not been addressed.

Please confirm this issue is still blocking you with the latest metro/rn or close this ticket if that's now resolved. Thank you!

@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

The type thing is fixed by metro, I have confirmed here @kelset. As I stated in clarification, My main fix is refactor current unix-like bash to nodejs script so we can test RNTester on windows.

@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

@dulmandakh@janicduplessis Can you guys review my pr ? Thanks.

@gengjiawen
gengjiawenforce-pushed the feature/RNTester_start branch from b1890cd to b69a154CompareAugust 3, 2018 15:24
@gengjiawen

Copy link
Copy Markdown
ContributorAuthor

@rafeca I have updated the code.

@rafeca

Copy link
Copy Markdown
Contributor

This looks good to me, I'm going to import this to Phabricator.

@hramos : any thoughts?

@facebook-github-botfacebook-github-bot 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.

rafeca has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was closed by @gengjiawen in a286c0e.

Once this commit is added to a release, you will see the corresponding version tag below the description at a286c0e. If the commit has a single master tag, it is not yet part of a release.

@reactreact locked as resolved and limited conversation to collaborators Aug 3, 2018
@react-native-botreact-native-bot added the Merged This PR has been merged. label Aug 3, 2018
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RNTester-Windows-Android

6 participants

@gengjiawen@pvdz@hramos@rafeca@react-native-bot@facebook-github-bot