-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 all build/test issues on master for android, detox & objc CI stages + update to Babel 7 #20854
Conversation
…to be passed to reject
…ap instance to be passed to reject
…ary and not done anywhere else - prevents a 'ambiguous method' error as rejects 3rd arg can be Throwable or Writable map.
…ot babel.config.js file
Generated by 🚫 dangerJS |
…ACT_NATIVE_DIR directory - otherwise the Babel config file is ignored
@kelset no worries! I'd personally avoid merging this yet as is, sorry - as we don't really want all these extra Babel dev deps being added to the project - these will be gone shortly; once I add in (I was unaware that the preset had moved to |
…Babel 7 devDeps. Additionally update metro dependencies to ^0.44.0 to keep Babel 7 versions consistent.
@kelset changes done and passing again. I've switched it over to the All the other Babel dependencies have been removed as no longer required. Notes
Potentially related PR: https://github.com/facebook/metro/pull/198/files
Once --- a/package.json
+++ b/package.json
@@ -170,10 +170,10 @@
"graceful-fs": "^4.1.3",
"inquirer": "^3.0.6",
"lodash": "^4.17.5",
- "metro": "^0.44.0",
- "metro-babel-register": "^0.44.0",
- "metro-core": "^0.44.0",
- "metro-memory-fs": "^0.44.0",
+ "metro": "^0.45.0",
+ "metro-babel-register": "^0.45.0",
+ "metro-core": "^0.45.0",
+ "metro-memory-fs": "^0.45.0",
"mime": "^1.3.4",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
@@ -202,12 +202,12 @@
"yargs": "^9.0.0"
},
"devDependencies": {
- "@babel/core": "7.0.0-beta.56",
- "@babel/runtime": "7.0.0-beta.56",
- "@babel/plugin-transform-runtime": "7.0.0-beta.56",
- "metro-react-native-babel-preset": "^0.44.0",
+ "@babel/core": "^7.0.0",
+ "@babel/runtime": "^7.0.0",
+ "@babel/plugin-transform-runtime": "^7.0.0",
+ "metro-react-native-babel-preset": "^0.45.0",
"async": "^2.4.0",
- "babel-eslint": "9.0.0-beta.2",
+ "babel-eslint": "^9.0.0",
"detox": "^8.0.0",
"eslint": "5.1.0",
"eslint-config-fb-strict": "22.1.0", ( |
… no longer in-use react_native_dep's
@kelset should be good to go now 🤞 EDIT - yep all good 🎉 I had to fix a few more things after updating from master; specifically, buck issues - there were redundant & duplicate dependencies defined on master that was breaking build/buck fetch. Sorry for the delay - on a different Mac today so had to re-setup my environment 😫 |
No problem! Thanks for doing this 💪 I'll check with Mike, maybe we can even get this in for rc4 :) |
@kelset no problem :) will also give |
I just saw this PR - @Salakar thanks so much for working on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
… of these types via `metro-config` types, see circleci.com/gh/facebook/react-native/50738
Ignore last 2 commits sorry - I derped and merged my local master into my PR branch - I reverted immediately though so it's back to normal. 🙈 |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
My guess is it's this commit 10 hours ago: a8a63b1 😫 will sync up again shortly EDIT: most likely was the NPM DNS/SSL issue that caused this to fail. Had no issues locally with this commit and all the other CI stages are running fine 👍 |
Right so I synced up to master and everything runs fine locally - I think the failure may be due to an ongoing NPM service outage at the moment: Yarn installs are failing because of this - network connectivity issue on the build log: https://circleci.com/gh/facebook/react-native/51201?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link EDIT: yep just the NPM outage issue - can re-run test_node10 once connectivity issue is resolved |
@hramos The import failed, need to import again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Will close this PR now as several commits have now been merged that are a subset of this PR. Thanks all. |
This 'fixes' the following failing CI stages:
Fixes
Missing Buck Dependency
This fixes Android tests failing to build on master when running:
./scripts/run-android-local-unit-tests.sh
Without this master fails to build with the following error:
This commit appears to be the culprit: bce77c8 - Android support annotations imported but buck file was not updated.
JS Bundles not being transformed with the React Native Babel preset
There's an issue with building JS bundles - no Babel preset is being applied to
RNTester
when usinglocal-cli
which causes a syntax error on Flow types and on JSX syntax:KEEP: To fix this I've added a new format
babel.config.js
file at the root which works for bothjest
(babelrc: false
is set on options so does not interfere) andRNTester/local-cli
bundled output (babel-preset-react-native
). Additionallyreact-native-xcode.sh
was updated to run Node from the project root - otherwise it never picks up the babel config and will fail to run with the same issues as before.EDIT: Below is no longer relevant - all updated to now use the release version of Babel v7.0.0
REMOVE: Once
babel-preset-react-native
has been updated to usebeta.56
thebabel.config.js
can be updated to just be the following and all the deps taken out the package.json again (except for RN preset):I would PR to
babel-preset-react-native
but I can no longer find it, doesn't seem to exist on GitHub anymore - it was in the root of the project before?EDIT: this is now
metro-react-native-babel-preset
- and latest version is now added.Test Plan:
Ran the Android local unit test shell script (as above), tests have all passed, output:
Ran the jest tests (
npm run test
), tests have all passed, output:Full CI passing 👀
Release Notes:
N/A - Internals