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 crna-kitchen-sink not working #7200

Merged
merged 2 commits into from Jul 19, 2019

Conversation

lonyele
Copy link
Member

@lonyele lonyele commented Jun 26, 2019

Issue: #7199

What I did

I've matched react, react-native, expo sdk version by bumping up

  • react-native to latest stable version 0.59.9
  • react-native to sdk 33.0.0
  • expo version to 33.0.7
  • expo sdkVersion to 33.0.0

More info

I'm not totally sure but there was a mismatch of react, react-native, expo sdk version.

Possibly introduced from here that upgrading react version from 16.5.1 to 16.8.6
or where expo sdk was not upgraded when the upgrade of react and react-native has happened

I referenced here, here

I'm not sure about bumping up expo-cli or peer-dependencies of react-native to >=0.59 Should I upgrade it?

Personally, ugrading react-native scares me... so if this breaks something please comment on this

How to test

  • Is this testable with Jest or Chromatic screenshots? No
  • Does this need a new example in the kitchen sink apps? No
  • Does this need an update to the documentation? No

If your answer is yes to any of these, please make sure to include it in your PR.

@vercel
Copy link

vercel bot commented Jun 26, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-fork-lonyele-fix-crna-kitchen-sink.storybook.now.sh

@lonyele lonyele changed the title fix: mismatch of react, react-native, expo sdk version Fix crna-kitchen-sink not working Jun 26, 2019
@Gongreg
Copy link
Member

Gongreg commented Jun 26, 2019

Hey @lonyele, thanks for fixing it! :) I never really use CRNA example, so it keeps getting outdated. We should really improve the situation there, maybe having e2e tests will help.

"@types/react-native": "^0.57.57",
"react-native": "^0.57.8"
"@types/react-native": "^0.57.64",
"react-native": "^0.59.9"
Copy link
Member

Choose a reason for hiding this comment

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

our peer dependency still says "react-native": ">=0.57.0" but it looks like we broke backward compatibility with older version of RN. We may need a deeper look to understand why that happened to see if it can be fixed. With our next major release, we may want to document what version of RN/expo we're going to support and for how long. We should be able to support 0.59 for longer than 0.57 since that's the first version with react hooks support.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeap It seems like more investigation is needed. I didn't get much from seeing why the deploy/build failed. For now, I don't know what to do next... If you have a guess, can you tell me where to look?

Copy link
Member

Choose a reason for hiding this comment

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

There were few lines of changes yet I didn't see this one. :/
What exactly is the reason to currently lock it to .57 ? What breaking change did we introduce?
And do we need to lock it to .59? If there is need we can do it for next major version I guess.
But I don't think that should be the reason why expo build is failing. I could try to take a look into it too.

Copy link
Member

Choose a reason for hiding this comment

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

the main one is some of the storybook core code started using hooks which weren't supported before 59

Copy link
Member

Choose a reason for hiding this comment

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

Do you know which part? Maybe we can do something about it? Because if we can't change it we have to lock the version and notify people about it.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not really sure, this is mostly a guess 😅

Copy link
Member Author

@lonyele lonyele Jul 2, 2019

Choose a reason for hiding this comment

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

@Gongreg @benoitdion Sorry guys. CI failed because of source-loader problem. After I merged latest next branch, there was no test fail anymore. Though do you guys think merging this PR is safe? Unless upgrading peer-dependency of react-native, it looks ok to me. Because only crna-kitchen-sink gets the upgrade. Not the users using react-native

@lonyele
Copy link
Member Author

lonyele commented Jul 9, 2019

Hm... CI for build and test looks fine but only now deployement has a problem. What should I do? I don't know why now deployment has failed also I can't rerun the ci...

btw while I was resolving yarn.lock conflict, I messed up the branch so I just started again from the latest next branch and applied the changes(that is why force-pushed is used)

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM @benoitdion are you ok with this?

@benoitdion
Copy link
Member

I'm ok merging since the peer dependency is version is unchanged but we should still spend time understanding why the bump was required for the kitchen sink app. It could still mean next broke compatibility with RN 0.57

@lonyele
Copy link
Member Author

lonyele commented Jul 9, 2019

@benoitdion I would just list errors that I've met. Most help is got from here

  • module schedule/tracking does not exist in the Haste module map error.
    --> I've bumped up react-native to the latest
  • console.error: React Native version mismatch. error. From a search

Sidenote for Expo Users:

If you are using expo, be aware that expo <= 32.0.0 uses a react-native version <= 0.57.2 and therefore will require the react version to be <= 16.5.1

--> Since react was already 16.8.6, I've bumped up all expo related versions to 33.0.0(sdk, expo, react-native)

@benoitdion
Copy link
Member

it's likely that we are now incompatible with pre-hook versions of react

@lonyele
Copy link
Member Author

lonyele commented Jul 10, 2019

@benoitdion hm.... I revert back react-native and only left what is in the crna-kitchen-sink and it is working! Come to think of it, app/react-native isn't relevant from the start?

@lonyele lonyele force-pushed the fix/crna-kitchen-sink branch 3 times, most recently from a528f5e to 3fa60c5 Compare July 18, 2019 10:22
@lonyele lonyele force-pushed the fix/crna-kitchen-sink branch 2 times, most recently from 683fbec to 12d3777 Compare July 19, 2019 02:31
@lonyele
Copy link
Member Author

lonyele commented Jul 19, 2019

Phew... no errors now. Can you guys check? @shilman @Gongreg

@shilman shilman merged commit 7517df6 into storybookjs:next Jul 19, 2019
@lonyele lonyele deleted the fix/crna-kitchen-sink branch July 29, 2019 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants