Skip to content

Fix packaging errors due to modifying outside of OUT_DIR #16

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

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

alexgeek
Copy link
Contributor

Tried to package but got this:

cargo package
   Packaging openvr_sys v2.1.0 (D:\liv\rust-openvr-sys-og)
    Updating crates.io index
    Packaged 51 files, 1.9MiB (364.3KiB compressed)
   Verifying openvr_sys v2.1.0 (D:\liv\rust-openvr-sys-og)
   Compiling proc-macro2 v1.0.93
   Compiling windows_x86_64_msvc v0.52.6
   Compiling unicode-ident v1.0.16
   Compiling glob v0.3.2
   Compiling prettyplease v0.2.29
   Compiling libc v0.2.169
   Compiling memchr v2.7.4
   Compiling minimal-lexical v0.2.1
   Compiling shlex v1.3.0
   Compiling regex-syntax v0.8.5
   Compiling either v1.13.0
   Compiling bindgen v0.71.1
   Compiling log v0.4.25
   Compiling rustc-hash v2.1.0
   Compiling bitflags v2.8.0
   Compiling cc v1.2.10
   Compiling itertools v0.13.0
   Compiling clang-sys v1.8.1
   Compiling nom v7.1.3
   Compiling windows-targets v0.52.6
   Compiling libloading v0.8.6
   Compiling cmake v0.1.53
   Compiling regex-automata v0.4.9
   Compiling quote v1.0.38
   Compiling syn v2.0.96
   Compiling cexpr v0.6.0
   Compiling regex v1.11.1
   Compiling openvr_sys v2.1.0 (D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.31s
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: D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0\bindings.rs
        D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0\openvr\bin
        D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0\openvr\bin\win64
        D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0\openvr\bin\win64\Debug
        D:\liv\rust-openvr-sys-og\target\package\openvr_sys-2.1.0\openvr\bin\win64\Debug\openvr_api64.lib

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

Now bindings and CMake is all generated into OUT_DIR and cargo package succeeds, I can publish after this is squashed into master.

@alexgeek alexgeek added the bug label Jan 30, 2025
@alexgeek alexgeek requested a review from Tsuguri January 30, 2025 15:40
@Tsuguri
Copy link
Collaborator

Tsuguri commented Jan 30, 2025

Makes sense to build to out_dir. Built locally for me.

One thing: you don't have to bump the version since nothing was released :)

@alexgeek alexgeek merged commit 680ebe6 into master Jan 30, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants