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

Fix RNTester on Windows #19974

Closed
wants to merge 7 commits into from

Conversation

gengjiawen
Copy link
Contributor

@gengjiawen gengjiawen commented Jun 29, 2018

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 owner June 29, 2018 12:10
@gengjiawen gengjiawen changed the title [WIP]fix RNTester on windows [WIP]fix RNTester on windows fix https://github.com/facebook/react-native/issues/19654 Jun 29, 2018
@gengjiawen gengjiawen changed the title [WIP]fix RNTester on windows fix https://github.com/facebook/react-native/issues/19654 [WIP]fix RNTester on windows fix #19654 Jun 29, 2018
@gengjiawen gengjiawen changed the title [WIP]fix RNTester on windows fix #19654 [WIP]fix RNTester on windows Jun 29, 2018
@facebook-github-bot facebook-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
@gengjiawen gengjiawen changed the title [WIP]fix RNTester on windows [WIP]Fixes https://github.com/facebook/react-native/issues/19654 Jun 29, 2018
@gengjiawen gengjiawen changed the title [WIP]Fixes https://github.com/facebook/react-native/issues/19654 [WIP]Fixes #19654 Jun 29, 2018
@react-native-bot react-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
Copy link

pvdz commented Jul 12, 2018

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

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

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

@gengjiawen gengjiawen force-pushed the feature/RNTester_start branch 2 times, most recently from ec52f94 to 3589b8f Compare July 19, 2018 12:03
@gengjiawen gengjiawen changed the title [WIP]Fixes #19654 Fixes #19654 Jul 19, 2018
@gengjiawen
Copy link
Contributor Author

@hramos This can be merged.

@gengjiawen
Copy link
Contributor Author

gengjiawen commented Jul 20, 2018

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
Contributor

hramos commented Jul 20, 2018

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

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

gengjiawen commented Jul 20, 2018

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

@pvdz
Copy link

pvdz commented Jul 23, 2018

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

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

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

@gengjiawen
Copy link
Contributor Author

@rafeca I have updated the code.

@rafeca
Copy link
Contributor

rafeca commented Aug 3, 2018

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

@hramos : any thoughts?

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

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

@facebook facebook locked as resolved and limited conversation to collaborators Aug 3, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RNTester-Windows-Android
6 participants