Skip to content

Commit

Permalink
Use fake.rs not /dev/null as fake source file (bazelbuild#2851)
Browse files Browse the repository at this point in the history
We store in the lockfile the path of this source file relative to the
package, and if we use an absolute path we end up encoding the depth of
your local git clone into the lockfile, which is non-determinstic across
machines.

Elsewhere we use fake.rs, let's use it here as well.
  • Loading branch information
illicitonion authored Sep 10, 2024
1 parent cbdf540 commit 2050351
Show file tree
Hide file tree
Showing 137 changed files with 1,586 additions and 2,057 deletions.
2 changes: 1 addition & 1 deletion examples/bazel_env/rust/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"
publish = false

[lib]
path = "/dev/null"
path = "fake.rs"
2 changes: 1 addition & 1 deletion examples/bzlmod/all_crate_deps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
publish = false

[lib]
path = "/dev/null"
path = "fake.rs"

[dependencies]
anyhow = "1.0.79"
2 changes: 1 addition & 1 deletion examples/bzlmod/hello_world/third-party/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
publish = false

[lib]
path = "/dev/null"
path = "fake.rs"

[dependencies]
anyhow = "1.0.77"
2 changes: 1 addition & 1 deletion examples/bzlmod/override_target/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
publish = false

[lib]
path = "/dev/null"
path = "fake.rs"

[dependencies.foo]
version = "0.0.0"
3 changes: 1 addition & 2 deletions examples/crate_universe/multi_package/cargo-bazel-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2050351

Please sign in to comment.