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

Clone submodules when updating subtree #51

Closed

Conversation

carolynzech
Copy link

@carolynzech carolynzech commented Aug 15, 2024

pull_from_upstream.sh runs git subtree to update our copy of library, but this command does not pull submodules.
This PR updates the script to clone library's two submodules (backtrace and stdarch) automatically.

Without this fix, check_kani.sh fails with this error:

++ echo 'Running tests...'
Running tests...
++ echo

++ cd /var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.Dlu57hiAU0
++ /var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.efDFDxOWPB/scripts/kani verify-std -Z unstable-options /var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.Dlu57hiAU0/library --target-dir /var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.fWNS0lC7vq -Z function-contracts -Z mem-predicates
Kani Rust Verifier 0.54.0 (standalone)
    Creating library package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
error: failed to load manifest for workspace member `/private/var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.Dlu57hiAU0/library/std`
referenced by workspace at `/private/var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.Dlu57hiAU0/Cargo.toml`

Caused by:
  failed to load manifest for dependency `std_detect`

Caused by:
  failed to read `/private/var/folders/2r/g_zkltvs27d511hds3r2_rsw0000gq/T/tmp.Dlu57hiAU0/library/stdarch/crates/std_detect/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
error: Failed to execute cargo (exit status: 101). Found 0 compilation errors.

This PR should be merged after #50.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@carolynzech carolynzech requested a review from a team as a code owner August 15, 2024 22:58
@carolynzech carolynzech marked this pull request as draft August 15, 2024 22:59
@carolynzech
Copy link
Author

This is actually more complicated than I realized because we also need to be sure that the versions of the submodules are correct (i.e., point to the correct commit) which may not be the most recent one. I'm going to close this and think on it more; if I do merge a PR, I'll include some other script updates as well.

@carolynzech carolynzech deleted the clone-submodules branch September 10, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant