Skip to content

Commit 8f85a98

Browse files
authored
refactor(frozen-api): optimize API boundary protection (#18649)
* refactor(frozen-api): optimize API boundary protection - Reduce from 35 protected structures to 8 key entry points - Remove hash protection from child structures, keep FrozenAPI derives - Preserve transitive verification chain integrity - Add support for project-specific type aliases in validation - Clean up unused imports and machete warnings Entry points preserved: TableSchema, Scalar, SegmentStatistics, TableSnapshotStatistics, SegmentInfo(v2/v4), CompactSegmentInfo, TableSnapshot * fix: configure nextest for proc-macro crate compatibility - Add single-threaded execution for databend-common-frozen-api in nextest - Use serial-integration test group to avoid linking issues - Resolve CI test failures with nextest runner * Revert "fix: configure nextest for proc-macro crate compatibility" This reverts commit 7613f4f. * fix: enable rpath for nextest dynamic library linking - Set rpath = true in test profile to fix nextest SIGABRT errors - Allows nextest to find libstd and other dynamic libraries at runtime - Resolves proc-macro crate testing issues in CI * Revert "fix: enable rpath for nextest dynamic library linking" This reverts commit 1d970a6. * fix: add frozen_api UI test golden files and nextest compatibility - Add .stderr golden files for trybuild error validation - Update .gitignore to allow frozen_api test golden files - Enable rpath=true to fix nextest dynamic library linking issues - Ensures CI tests pass with proper error message validation
1 parent 1a588ff commit 8f85a98

38 files changed

+675
-421
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ perf.*
2323

2424
# tests
2525
*.stderr
26+
# Exception: frozen_api UI test golden files
27+
!src/common/frozen_api/tests/ui/errors/*.stderr
2628
*.stdout
2729
*.out
2830
*.err

Cargo.lock

Lines changed: 78 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ codegen-units = 16
647647
lto = false
648648
debug-assertions = true
649649
overflow-checks = true
650-
rpath = false
650+
rpath = true
651651

652652
[patch.crates-io]
653653
arrow-udf-runtime = { git = "https://github.com/datafuse-extras/arrow-udf.git", rev = "a442343" }

src/common/frozen_api/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition.workspace = true
88

99
[lib]
1010
doctest = false
11-
test = false
11+
test = true
1212
proc-macro = true
1313

1414
[dependencies]
@@ -17,3 +17,9 @@ proc-macro2 = "1.0"
1717
quote = "1.0"
1818
sha2 = { workspace = true }
1919
syn = { version = "2.0", features = ["full"] }
20+
21+
[dev-dependencies]
22+
trybuild = "1.0"
23+
24+
[package.metadata.cargo-machete]
25+
ignored = ["hex", "proc-macro2", "quote", "sha2", "syn"]

0 commit comments

Comments
 (0)