baoyachi / shadow-rs

A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
https://docs.rs/shadow-rs
MIT License
444 stars 40 forks source link

Issue with `cargo publish` ? #135

Closed ChristopherRabotin closed 1 year ago

ChristopherRabotin commented 1 year ago

Hi there,

In my build.rs file, I've got the following as per the instructions:

fn main() -> shadow_rs::SdResult<()> {
    shadow_rs::new()
}

When I try to publish the package, I get the following error (full traceback here):

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: /home/runner/work/nyx/nyx/target/package/nyx-space-2.0.0-alpha/Cargo.lock

I diff'd the Cargo.lock file before and after running cargo publish on my machine instead of the github action, and it seems that the cargo.lock file didn't actually change.

Any idea what could be causing this issue? Thanks

baoyachi commented 1 year ago

@ChristopherRabotin Sorry, I will try to reproduce this problem later.

baoyachi commented 1 year ago

@ChristopherRabotin fixed this in version 0.23. Please use

shadow-rs = "0.23.0"