cli icon indicating copy to clipboard operation
cli copied to clipboard

No conflicting files after apply fails in upgrade command

Open darkbasic opened this issue 3 years ago • 1 comments

[niko@fedora client]$ react-native upgrade
info No version passed. Fetching latest...
info Fetching diff between v0.62.2 and v0.64.1...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
  - App.js
error Excluding files that failed to apply the diff:
  - android/gradlew.bat
  - ios/client.xcodeproj/project.pbxproj
Please make sure to check the actual changes after the upgrade command is finished.
You can find them in our Upgrade Helper web app: https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.64.1
info Installing "[email protected]" and its peer dependencies...
info Running "git status" to check what changed...
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   .flowconfig
	modified:   .gitattributes
	new file:   _editorconfig
	modified:   android/app/build.gradle
	modified:   android/app/src/debug/AndroidManifest.xml
	modified:   android/app/src/main/AndroidManifest.xml
	modified:   android/app/src/main/res/values/styles.xml
	modified:   android/build.gradle
	modified:   android/gradle.properties
	modified:   android/gradle/wrapper/gradle-wrapper.jar
	modified:   android/gradle/wrapper/gradle-wrapper.properties
	modified:   android/gradlew
	modified:   ios/Podfile
	deleted:    ios/client-tvOS/Info.plist
	deleted:    ios/client-tvOSTests/Info.plist
	deleted:    ios/client.xcodeproj/xcshareddata/xcschemes/client-tvOS.xcscheme
	modified:   ios/client.xcodeproj/xcshareddata/xcschemes/client.xcscheme
	modified:   ios/client/AppDelegate.m
	deleted:    ios/client/Base.lproj/LaunchScreen.xib
	modified:   ios/client/Info.plist
	new file:   ios/client/LaunchScreen.storyboard
	modified:   metro.config.js
	modified:   package.json
	modified:   yarn.lock

success Upgraded React Native to v0.64.1 🎉. Now you can review and commit the changes

I've tried both 4.14.0 and 5.0.1-alpha.2 but whenever I upgrade my project it doesn't show any conflict for android/gradlew.bat and ios/client.xcodeproj/project.pbxproj so I have no chance to fix the failed merge attempt.

darkbasic avatar May 05 '21 13:05 darkbasic

I have no chance to fix the failed merge attempt.

I believe this is the expected behavior. The tool does a test apply, and any files that cannot cleanly patch (those marked Excluding files that failed to apply the diff) are excluded from the actual patching.

So, you will only get updates to files that cleanly patch or are new/deleted but match the expected state from the version you are upgrading from.

bradjones1 avatar Jun 13 '22 02:06 bradjones1

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

github-actions[bot] avatar Nov 26 '22 03:11 github-actions[bot]

I believe this is the expected behavior. The tool does a test apply, and any files that cannot cleanly patch (those marked Excluding files that failed to apply the diff) are excluded from the actual patching.

This makes no sense: I want to run git mergetool instead.

darkbasic avatar Nov 26 '22 11:11 darkbasic

Hey, since the upgrade command was changed to just link to upgrade helper in https://github.com/react-native-community/cli/pull/1879 - I'm closing this issue because it's outdated.

szymonrybczak avatar May 15 '23 19:05 szymonrybczak