Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

[Dev] RN v0.45 Upgrade #570

Merged
merged 16 commits into from
Jun 1, 2017
Merged

[Dev] RN v0.45 Upgrade #570

merged 16 commits into from
Jun 1, 2017

Conversation

sarahscott
Copy link
Contributor

@sarahscott sarahscott commented May 26, 2017

Tested on Device?

How to get set up with this PR?

 

To run on your computer:

git fetch origin pull/570/head:sarahscott-570-checkout
git checkout sarahscott-570-checkout
yarn install
cd example; pod install; cd ..
open -a Simulator
yarn start

Then run xcrun simctl launch booted net.artsy.Emission once a the simulator has finished booting

To run inside Eigen (prod or beta) or Emission (beta): Shake the phone to get the Admin menu.

If you see "Use Staging React Env" - click that and restart, then follow the next step.

Click on "Choose an RN build" - then pick the one that says: "X,Y,Z"

Note: this is a TODO for PRs, currently you can only do it on master commits.

@ArtsyOpenSource
Copy link

ArtsyOpenSource commented May 26, 2017

Warnings
⚠️

Please assign someone to merge this PR, and optionally include people who should review.

⚠️

Missing Test Files:

  • src/lib/components/__tests__/load_failure_view-tests.tsx
  • src/lib/components/__tests__/opaque_image_view-tests.tsx
  • src/lib/components/__tests__/switch_view-tests.tsx

If these files are supposed to not exist, please update your PR body to include "Skip New Tests".

⚠️

Could not find stories using these components:

  • Biography

  • Artworks

  • LoadFailureView

  • OpaqueImageView

  • SwitchView

Generated by 🚫 dangerJS

const {compactMapping} = require('react-native/packager/src/Bundler/source-map');
const {compactMapping} = require('./src/Bundler/source-map');

import type {Plugins as BabelPlugins} from 'babel-core';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are the offensive imports

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh, they are in the updated file. I was going off of the code base in master as-is.

Ok this should be easy. Something like const BabelPlugins = require("babel-core").Plugins

@alloy
Copy link
Contributor

alloy commented May 29, 2017

* back Enzyme or something similar once we figure out compatibility issues with RN 0.45+
*/
rail.state = { didPerformFetch: true }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is probably due to setState being async, you need to use something like setImmediate to perform assertions on the next runloop tick.

@@ -15,7 +15,7 @@ target 'Emission' do
pod 'Emission', :path => '../'

# As this runs dev, we need the developer web socket
pod 'React', :path => react_path, :subspecs => %w(RCTWebSocket)
pod 'React', :path => react_path, :subspecs => %w(DevSupport BatchedBridge RCTAnimation)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RCTAnimation subspec causes problems, but I can build Emission if this postinstall script is included in package.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the addition to our package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add it now - wasn't sure if we actually wanted to use it or not.

Copy link
Contributor

@alloy alloy May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't appear to be another simple way around that, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found one. The Gene container relies on react-native-parallax-scroll-view, which uses Animated. However, the ArtistCard also uses Animated and works fine without RCTAnimation, so perhaps there is a way around it? With the post-install script and RCTAnimation, though, the Gene error is solved, so maybe it's a good idea to include it if we can.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArtistCard uses the pure JS animation library, so it’s not using the pod like the Gene one is.

@alloy
Copy link
Contributor

alloy commented May 31, 2017

I can reproduce the CI test failures by running the tests ‘in band’, i.e. yarn test -- -i.

@alloy
Copy link
Contributor

alloy commented May 31, 2017

It happens in src/lib/components/consignments/components/__tests__/artist-search-results-tests.tsx, but only when ran with other test files, not in isolation.

@alloy
Copy link
Contributor

alloy commented May 31, 2017

Commenting out this component makes it go away. The component is essentially a TextView, maybe it needs stubbing? /cc @orta

@orta
Copy link
Contributor

orta commented Jun 1, 2017

That sounds 👍 to me, it's not testing any work from the input itself

@alloy
Copy link
Contributor

alloy commented Jun 1, 2017

Can you add a CHANGELOG entry? I think it should then be green, in which case please go ahead and merge 👍

@sarahscott sarahscott changed the title [🚨][WIP][Dev] RN v0.45 Upgrade [Dev] RN v0.45 Upgrade Jun 1, 2017
@sarahscott
Copy link
Contributor Author

merging!

@sarahscott sarahscott merged commit 2ab32d6 into master Jun 1, 2017
@sarahscott sarahscott deleted the sarah-rn-v45-upgrade branch June 1, 2017 13:04
@alloy
Copy link
Contributor

alloy commented Jun 1, 2017

🍾

"clean-example": "cd Example && xcodebuild -workspace Emission.xcworkspace -scheme Emission -destination 'platform=iOS Simulator,name=iPhone 6' clean",
"type-check": "tsc --noEmit --pretty",
"lint": "tslint 'src/**/*.{ts,tsx}'",
"lint-fix": "npm run lint -- --fix",
"ci": "npm run type-check && npm run lint && npm run test -- --runInBand",
"danger": "danger",
"start": "npm run clean-example && concurrently --kill-others 'npm run start-packager' 'npm run storybook'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason that storybooks were removed from the app? I don't see a mention in the PR body

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipped #585 to fix it 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants