Skip to content

Conversation

@janicduplessis
Copy link
Contributor

This is the last bits needed to fix Windows compatibility on master, most of the work was done in node-haste.

Test plan
Run npm test
Run the packager using Windows and Mac

cc @cpojer @davidaurelio

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @cpojer, @davidaurelio and @martinbigio to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Mar 3, 2016
@janicduplessis janicduplessis changed the title Update node-haste and replace fast-path with node-haste's verrsion to fix Windows compatibility Update node-haste and replace fast-path with node-haste's version to fix Windows compatibility Mar 3, 2016
@davidaurelio
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@davidaurelio
Copy link
Contributor

@janicduplessis will have to take care of the node_modules updates internally first. Will look into it in a few. Maybe we could even get Travis back to green this morning before merging this

@davidaurelio
Copy link
Contributor

This has internal errors. no idea whether it’s flakiness or really broken :-(

@janicduplessis
Copy link
Contributor Author

Hmm the tests on circleci fails with this

Error: Cannot find module 'node-haste/lib/fastpath'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)

Looks like the node-haste version doesn't get updated properly.

@janicduplessis
Copy link
Contributor Author

Also the UIExplorer app is broken since a few commits, the tests on travis seems to fail because of that. If you have any internal tests that depend on that is may be why it fails.

@davidaurelio
Copy link
Contributor

The UIExplorer have been reverted in the meantime afaik. @bestander is having a look at this now

@bestander
Copy link
Contributor

@janicduplessis I would appreciate if you rebase.
CI should be stable-ish now

@facebook-github-bot
Copy link
Contributor

@janicduplessis updated the pull request.

@bestander
Copy link
Contributor

JS does not look good in tests

@janicduplessis
Copy link
Contributor Author

I can confirm that it stills install [email protected] even if I changed the package.json. Is that caused by npm shrinkwrap? I'm not sure how that works as I've never used it before.

├─┬ [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 

From the npm install logs.

@ide
Copy link
Contributor

ide commented Mar 3, 2016

@janicduplessis package.json is completely ignored when shrinkwrap is present.

@facebook-github-bot
Copy link
Contributor

@janicduplessis updated the pull request.

@janicduplessis
Copy link
Contributor Author

Aww, e2e test on iOS fails with

  [Info] Collecting info for testables... (4131 ms)
  run-test EndToEndTestTests.xctest (iphonesimulator9.2, iPhone 4s, application-test)
    [Info] Installed 'org.reactjs.native.example.EndToEndTest'. (18420 ms)
    [Info] Launching test host and running tests ... (0 ms)
      -[EndToEndTestTests testRendersWelcomeScreen][3:20:55 AM] <START> request:/index.ios.bundle?platform=ios&dev=true
[3:20:55 AM] <START> find dependencies
Error: Unable to find file with path: /private/tmp/react-native-uiz3Ujzd/EndToEndTest/ios/index.ios.js
    at Fastfs.readFile (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/fastfs.js:141:15)
    at /private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/Module.js:165:49
    at Cache.get (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/Cache/index.js:64:103)
    at Module.read (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/Module.js:164:26)
    at Module.getDependencies (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/Module.js:120:19)
    at /private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/lib/DependencyGraph/ResolutionRequest.js:29:17
    at /private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/node_modules/throat/index.js:11:22
    at new Promise (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/core-js/modules/es6.promise.js:197:7)
    at run (/private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/node_modules/throat/index.js:10:22)
    at /private/tmp/react-native-uiz3Ujzd/EndToEndTest/node_modules/react-native/node_modules/node-haste/node_modules/throat/index.js:39:16

@janicduplessis
Copy link
Contributor Author

Ok the issue seems to happen because of a regression in node-haste 2.5.0 it tries to find the index of a new app in /Users/janic/Developer/TestApp/node_modules/react-native/packager/index.ios.js when it is in /Users/janic/Developer/TestApp/index.ios.js.

@janicduplessis
Copy link
Contributor Author

Ok I was able to track down the bug to this change in node-haste, I'll check what is up with that.

facebookarchive/node-haste@9673f86#diff-1fdf421c05c1140f6d71444ea2b27638L198

@janicduplessis
Copy link
Contributor Author

Also I'm not sure if I updated the npm-shrinkwrap.json file properly the diff seems a bit too huge :)

I did that using npm 2.14

rm -rf node_modules
npm install
npm install --save [email protected]
npm uninstall --save fast-path
npm shrinkwrap

Not running npm shrinkwrap at the end didn't update the shrinkwrap file.

@mkonicek
Copy link
Contributor

mkonicek commented Mar 7, 2016

@janicduplessis I'm just merging #6346 which updates to a newer version. Should this PR be rebased or closed (not sure about the change in packager/react-packager/index.js)?

@janicduplessis
Copy link
Contributor Author

I'm pretty sure the change in packager/react-packager/index.js is still needed. I'll rebase and test once #6346 is merged.

@skevy
Copy link
Contributor

skevy commented Mar 8, 2016

I think you're right @janicduplessis. Thanks for looking into this :)

@janicduplessis janicduplessis mentioned this pull request Mar 8, 2016
7 tasks
@facebook-github-bot
Copy link
Contributor

@janicduplessis updated the pull request.

@davidaurelio
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in fd816b1 Mar 11, 2016
@davidaurelio
Copy link
Contributor

@bestander @mkonicek you might want to cherry pick this for the release. It makes windows compat better

@janicduplessis janicduplessis deleted the fix-windows branch March 14, 2016 03:04
bestander pushed a commit that referenced this pull request Mar 15, 2016
…fix Windows compatibility

Summary:This is the last bits needed to fix Windows compatibility on master, most of the work was done in node-haste.

**Test plan**
Run npm test
Run the packager using Windows and Mac

cc cpojer davidaurelio
Closes #6260

Reviewed By: dmmiller, bestander

Differential Revision: D3005397

Pulled By: davidaurelio

fb-gh-sync-id: e16847808ebfa8b234315b2093dba204c9c1e869
shipit-source-id: e16847808ebfa8b234315b2093dba204c9c1e869
cpojer pushed a commit to facebook/metro that referenced this pull request Jan 26, 2017
…fix Windows compatibility

Summary:This is the last bits needed to fix Windows compatibility on master, most of the work was done in node-haste.

**Test plan**
Run npm test
Run the packager using Windows and Mac

cc cpojer davidaurelio
Closes facebook/react-native#6260

Reviewed By: dmmiller, bestander

Differential Revision: D3005397

Pulled By: davidaurelio

fb-gh-sync-id: e16847808ebfa8b234315b2093dba204c9c1e869
shipit-source-id: e16847808ebfa8b234315b2093dba204c9c1e869
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants