Repository navigation
ci(reborn): run the full reborn_cli dependency closure on every PR #5110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,40 @@ if [ "$#" -ne 1 ]; then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case "$1" in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| package="$1" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Default flags for closure crates without an explicit recipe above: opt into | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # `default` and `libsql` when the crate declares them, so storage-backed crates | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # build their libSQL paths. Crates with no matching features build bare. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fallback_feature_flags() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metadata="$(cargo metadata --no-deps --format-version 1)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local feature_list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| feature_list="$( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jq -r --arg package "${package}" ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .packages[] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | select(.name == $package) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | .features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | keys[] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ' <<< "${metadata}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| )" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local features=() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if printf '%s\n' "${feature_list}" | grep -Fxq "default"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| features+=("default") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if printf '%s\n' "${feature_list}" | grep -Fxq "libsql"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| features+=("libsql") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${#features[@]}" -gt 0 ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local IFS=, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s\n' "--features ${features[*]}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+18
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can simplify this function significantly by performing the entire feature filtering and formatting logic directly inside
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case "${package}" in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_cli) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s\n' "--features webui-v2-beta,slack-v2-host-beta" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -31,9 +64,31 @@ case "$1" in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_webui_ingress) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s\n' "--features dev-in-memory-session" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_host_runtime) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Integration tests (tests/) link the lib as a normal dependency, so | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # cfg(test) is false there; the deterministic test-mode behavior they assert | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # is gated behind `feature = "test-support"`. libsql exercises the embedded | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # DB paths without a Postgres server (which the crate-tests job has none of). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s\n' "--features test-support,libsql" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_webui_v2 | ironclaw_webui_v2_static) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s\n' "--features webui-v2-beta" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_architecture | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_product_adapter_registry | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_product_context | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_config | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_identity | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_openai_compat | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_openai_compat_storage | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_reborn_traces | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_slack_v2_adapter | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_telegram_v2_adapter | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ironclaw_wasm_product_adapters) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Already on the allowlist with no feature flags; keep them flag-free now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # that the default branch derives fallback features for closure crates. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fallback_feature_flags | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| esac | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
Misleading error message on
cargo treefailure.If
cargo treefails, the script will hit this error message, but "No Reborn CLI workspace dependency closure crates discovered" suggests a dependency-graph issue rather than a tool failure. Consider checkingcargo treeexit status separately or clarifying the message.Clearer error handling
🤖 Prompt for AI Agents