jhugman / uniffi-bindgen-react-native

A uniffi bindings generator for calling Rust from react-native
https://jhugman.github.io/uniffi-bindgen-react-native/
Other
52 stars 6 forks source link

Updating a tag checkout is broken #118

Closed Johennes closed 1 month ago

Johennes commented 1 month ago

I fear I've broken tag checkouts with #115.

Running "git" "clone" "https://github.com/matrix-org/matrix-rust-sdk" "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" "--depth" "1"
Cloning into '/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk'...
Running cd "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" && "git" "fetch" "--depth" "1" "origin" "matrix-sdk-ffi/20241008"
From https://github.com/matrix-org/matrix-rust-sdk
 * tag               matrix-sdk-ffi/20241008 -> FETCH_HEAD
Running cd "/home/runner/work/react-native-matrix-sdk/react-native-matrix-sdk/rust_modules/matrix-rust-sdk" && "git" "checkout" "matrix-sdk-ffi/20241008"
error: pathspec 'matrix-sdk-ffi/20241008' did not match any file(s) known to git
Error: Failed to run command

I think the problem is that for a tag you need to do git fetch --depth 1 origin tag matrix-sdk-ffi/20241008 (not the extra tag not present in the log above). We'll probably have to add something to check if the value supplied in branch is a tag or not and then run the command accordingly.

Johennes commented 1 month ago

(As a workaround, one can supply the SHA behind the tag as argument to branch instead.)