Closed cipolleschi closed 2 years ago
cc @pvinis @lucasbento - can you help us here in understanding how to approach this?
Aside from fixing it, we also need to understand what to do with the affected versions, is there a way to revert a version and regenerate it correctly?
cc @Aleksefo who noticed first, and reported here
I'll be back to a laptop tomorrow, and I'll check
On a probably related note, going from 0.67.4 to 0.67.5 currently includes about 800 vendor/bundle/ruby/*
files, which inevitably crashes the browser tab.
error Your Ruby version is 3.0.4, but your Gemfile specified 2.7.5 https://github.com/react-native-community/rn-diff-purge/actions/runs/3406030709/jobs/5672164639#step:7:683
https://stackoverflow.com/a/37915028/7295772
https://circle-macos-docs.s3.amazonaws.com/image-manifest/v8824/index.html
System Version | macOS 12.5.1 (21G83) Installed Rubies | 2.7.6, 3.0.4, 3.1.2 (available to chruby)
I would try to change in ci environment the currently ruby version to 2.7.6 see https://github.com/postmodern/chruby
but I'm not sure it will work
but I noticed that we still use 2.7.6 in our circleci env in main branch https://github.com/facebook/react-native/commit/21c8837c1264cd96f5899e33132fa764bb9c2293
for debugging purposes, I think this ruby scripts are included in https://github.com/facebook/react-native/tree/main/scripts
Alright. I just read the whole thing here.
First, the contents.xcworkspacedata
file is ok to be missing. It is a file that is generated by Xcode when a workspace is opened/used. Here's an example. It holds no important info from RN, and it will be generated when/if needed. Nothing the upgrade-helper or people upgrading should care about.
Second, I see the ruby issue. Definitely a problem, I'll try to fix it and report back.
Third, I see the vendor files, I will try to address this first, as it seems like the most blocking thing.
Vendor stuff gone. I manually removed some. Seems like it was only on that specific upgrade to 0.67.5
. Fixed and pushed. https://react-native-community.github.io/upgrade-helper/?from=0.67.4&to=0.67.5 and others work as expected again.
fun 😅
I think I will also rebase so we can work with the diffs easier.
I regenerated the problematic 0.67.5
too, so now the new diffs will not have any vendor stuff in the diffs.
Ruby issue fixed too. I used asdf in the github-action here https://github.com/react-native-community/rn-diff-purge/blob/master/.github/workflows/new_release.yml, should be fine on the next diff generation. lets keep an eye!
I think I will close this issue, and lets open it up again if any of the above is not clear or not working. I feel confident for everything, though.
Bug
Some versions of the upgrade helper are missing the
contents.xcworkspacedata
.This is happening because the Ruby environment is not set properly and the script fails to:
Example failure
The script ignore the failure and proceeds with the job, publishing the diff anyway.
React Native versions
RnDiffApp.xcworkspace/contents.xcworkspacedata
file is missingRnDiffApp.xcworkspace/contents.xcworkspacedata
file is missingRnDiffApp.xcworkspace/contents.xcworkspacedata
file is missingRnDiffApp.xcworkspace/contents.xcworkspacedata
file is missingSteps to reproduce
Run the script and see the Cocoapods failure.
Suggested fix
The suggested fix would be to update the new-release.sh script so that:
rbenv
(or a similar Ruby Management systemcurl
the right [Ruby version]() for ReactNative when releasing a new version. It should use the version tags to learn where to look. Example for v0.70.XAs an additional safety net, the script should fail if the dependencies are not installed correctly, with a proper error message.