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

cargo publish --dry-run fails without --no-verify when using swift-rs #32

Closed
caoimhebyrne opened this issue Mar 7, 2023 · 0 comments · Fixed by #33
Closed

cargo publish --dry-run fails without --no-verify when using swift-rs #32

caoimhebyrne opened this issue Mar 7, 2023 · 0 comments · Fixed by #33
Labels
bug Something isn't working

Comments

@caoimhebyrne
Copy link
Contributor

caoimhebyrne commented Mar 7, 2023

I have a crate which uses swift-rs, and when trying to publish to crates.io, I got this error:

$ cargo publish --dry-run
error: failed to verify package tarball

Caused by:
  Source directory was modified by build.rs during cargo publish. Build scripts should not modify anything outside of OUT_DIR.
  Added: /Users/caoimhe/Development/Personal/localauthentication-rs/target/package/localauthentication-rs-0.1.0/swift-lib/.build
  	/Users/caoimhe/Development/Personal/localauthentication-rs/target/package/localauthentication-rs-0.1.0/swift-lib/.build/arm64-apple-macosx
  	/Users/caoimhe/Development/Personal/localauthentication-rs/target/package/localauthentication-rs-0.1.0/swift-lib/.build/arm64-apple-macosx/build.db
  	/Users/caoimhe/Development/Personal/localauthentication-rs/target/package/localauthentication-rs-0.1.0/swift-lib/.build/arm64-apple-macosx/debug
  	/Users/caoimhe/Development/Personal/localauthentication-rs/target/package/localauthentication-rs-0.1.0/swift-lib/.build/arm64-apple-macosx/debug/ModuleCache
...

(like a million lines later lol)

  To proceed despite this, pass the `--no-verify` flag.

swift-rs should try and stick within OUT_DIR (if possible, I'm unsure if we can do this) when building as per the "Building a native library" example on the Cargo Book.

Otherwise, we should state in the documentation somewhere why we can't stick within OUT_DIR and anyone publishing their crates should use --no-verify.

@Brendonovich Brendonovich added the bug Something isn't working label Mar 9, 2023
@Brendonovich Brendonovich linked a pull request Mar 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants