Skip to content

Commit 1c1e6d4

Browse files
authored
build: require fensu 0.31.0 and cap oversized code at its current size (#1500)
* build: require fensu 0.31.0 and cap oversized code at its current size Fensu 0.31.0 limits _helpers/ containers to 15 buckets and packages or crates to 75,000 code lines. The Python bindings crate, its helpers container and the runtime package are already over those limits, so each is capped at its current size until it is split. * build: cap the bindings crate and runtime package at their size after the merged rules change The orchestration and purity rules change merged first and added code to both, so the caps set before it were below their current size.
1 parent d3fed2f commit 1c1e6d4

5 files changed

Lines changed: 37 additions & 22 deletions

File tree

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ tower-http = { version = "0.6", default-features = false, features = ["compressi
7777
fensu-policy = "=0.22.0"
7878
# Fensu's Python facts and core rules without their Python bindings: the default `python`
7979
# feature adds PyO3, rusqlite, flate2 and sha2.
80-
fensu-facts = { version = "=0.30.0", default-features = false }
81-
fensu-native = { version = "=0.30.0", default-features = false }
80+
fensu-facts = { version = "=0.31.0", default-features = false }
81+
fensu-native = { version = "=0.31.0", default-features = false }
8282
futures-util = { version = "0.3", default-features = false, features = ["std"] }
8383
# `sqb` names compute log captures with random ids, as `uuid.uuid4().hex`.
8484
getrandom = "0.4"

‎fensu.toml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,11 @@ reason = "The custom-rule host tests compute expected module-state tokens with i
11751175
[targets.python.thresholds]
11761176
max_positional_args = 1
11771177

1178+
[[targets.python.threshold_overrides]]
1179+
paths = ["src/sqlbuild/__init__.py"]
1180+
thresholds = { max_crate_code_lines = 89457 }
1181+
reason = "The runtime package is above the code-line limit; this caps it at its current size until it is split into packages by area. Lower the cap as code moves out."
1182+
11781183
[targets.python.rule_options.XSB074]
11791184
pending_budgets = [
11801185
"tests/e2e/src/sqlbuild/cli/commands/main/compile/helpers.py=6",
@@ -1639,6 +1644,16 @@ rule_modules = [
16391644
]
16401645
select = ["FPRS", "XSB072", "XSB073", "XSB075", "XSB076", "XSB077", "XSB078", "XSB079"]
16411646

1647+
[[targets.rust.threshold_overrides]]
1648+
paths = ["crates/sqlbuild-python/Cargo.toml"]
1649+
thresholds = { max_crate_code_lines = 217769 }
1650+
reason = "The Python bindings crate is above the code-line limit; this caps it at its current size until it is split into crates by area. Lower the cap as code moves out."
1651+
1652+
[[targets.rust.threshold_overrides]]
1653+
paths = ["crates/sqlbuild-python/src/bindings/_helpers"]
1654+
thresholds = { max_helpers_container_buckets = 111 }
1655+
reason = "The bindings helpers container is above the bucket limit; this caps it at its current bucket count until cohesive groups move into their own modules or crates. Lower the cap as buckets move out."
1656+
16421657
[targets.rust.rule_options.XSB076]
16431658
schema_paths = ["crates/sqlbuild-orchestration/src/store"]
16441659
allowed = [

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ dev = [
8181
"pytest-cov>=7.0.0",
8282
"pytest-xdist>=3.8.0",
8383
"ruff>=0.12.0",
84-
"fensu>=0.29.1",
84+
"fensu>=0.31.0",
8585
"testcontainers>=4.8.1",
8686
"ty>=0.0.1a19",
8787
]

‎uv.lock‎

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

0 commit comments

Comments
 (0)