Skip to content

Commit

Permalink
Fix recent bugs with shim/third-party
Browse files Browse the repository at this point in the history
Summary:
Observed builds at [TraceMachina/buck2](https://github.com/TraceMachina/buck2/actions/workflows/build-and-test.yml) recently broke due to inconsistencies with shim/third-party directory.

`reindeer buckify` will not delete existing `Cargo.lock` and `BUCK` if they already exist. `reindeer update` might assume that `reindeer buckify` was done first. A simple and consistent way is to ensure those files are deleted before calling `reindeer` instead of assuming how `reindeer` will behave.

[serde-rs](https://github.com/serde-rs/json/blob/5ebf65cc480f90714c94f82099ca9161d80cbb10/build.rs#L11) recently introduced a rustc configuration flag that has to be set.`fast_arithmetic` chooses the architecture based on `target_arch`, repeat the same in the fixup scripts.

`zstd` is missing header files, most likely not caught due to stale `Cargo.lock` and `BUCK` files.

X-link: facebook/buck2#751

Reviewed By: JakobDegen

Differential Revision: D61753931

Pulled By: dtolnay

fbshipit-source-id: 2432083b700149a24cdd9b3954d250a147403954
  • Loading branch information
adam-singer authored and facebook-github-bot committed Aug 24, 2024
1 parent d1016e8 commit b515b64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion shim/third-party/rust/fixups/serde_json/fixups.toml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
buildscript = []
[[buildscript]]
[buildscript.rustc_flags]
8 changes: 6 additions & 2 deletions shim/third-party/rust/fixups/zstd-sys/fixups.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ srcs = [
headers = [
"zdict.h",
"zstd.h",
"zstd/lib/common/allocations.h",
"zstd/lib/common/bits.h",
"zstd/lib/common/bitstream.h",
"zstd/lib/common/compiler.h",
"zstd/lib/common/cpu.h",
Expand All @@ -32,7 +34,7 @@ headers = [
"zstd/lib/common/pool.h",
"zstd/lib/common/portability_macros.h",
"zstd/lib/common/threading.h",
#"zstd/lib/common/xxhash.h",
"zstd/lib/common/xxhash.h",
"zstd/lib/common/zstd_deps.h",
"zstd/lib/common/zstd_internal.h",
"zstd/lib/common/zstd_trace.h",
Expand Down Expand Up @@ -78,6 +80,8 @@ srcs = [
headers = [
"zdict.h",
"zstd.h",
"zstd/lib/common/allocations.h",
"zstd/lib/common/bits.h",
"zstd/lib/common/bitstream.h",
"zstd/lib/common/compiler.h",
"zstd/lib/common/cpu.h",
Expand All @@ -89,7 +93,7 @@ headers = [
"zstd/lib/common/pool.h",
"zstd/lib/common/portability_macros.h",
"zstd/lib/common/threading.h",
#"zstd/lib/common/xxhash.h",
"zstd/lib/common/xxhash.h",
"zstd/lib/common/zstd_deps.h",
"zstd/lib/common/zstd_internal.h",
"zstd/lib/common/zstd_trace.h",
Expand Down

0 comments on commit b515b64

Please sign in to comment.