feat: lifetime elision, tooling CI, registry, and LSP locals
Ship the QUALITY_PLAN stretch from ownership through ecosystem: C.1 lifetime elision (bootstrap + selfhost), bux fmt/test/doc CI hooks, stdlib goldens, package registry (bux search/add), and LSP 0.4 position-sensitive locals with inferred let types. Full-tree format pass plus Map/Set remove double-free fix.
This commit is contained in:
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke: registry search + add + install + build with greet package (E.1)
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
BUXC="$ROOT/buxc"
|
||||
export BUX_REGISTRY="$ROOT/config/registry.toml"
|
||||
|
||||
if [[ ! -x "$BUXC" ]]; then
|
||||
(cd "$ROOT" && make build >/dev/null)
|
||||
fi
|
||||
|
||||
TMP=$(mktemp -d)
|
||||
trap 'rm -rf "$TMP"' EXIT
|
||||
|
||||
echo "=== bux search greet ==="
|
||||
"$BUXC" search greet | tee "$TMP/search.out"
|
||||
grep -q greet "$TMP/search.out"
|
||||
|
||||
echo "=== create consumer project ==="
|
||||
mkdir -p "$TMP/app/src"
|
||||
cat > "$TMP/app/bux.toml" <<'EOF'
|
||||
[Package]
|
||||
Name = "registry_consumer"
|
||||
Version = "0.1.0"
|
||||
Type = "bin"
|
||||
|
||||
[Build]
|
||||
Output = "Bin"
|
||||
EOF
|
||||
|
||||
cat > "$TMP/app/src/Main.bux" <<'EOF'
|
||||
import Std::Io::{PrintLine};
|
||||
import Std::String::{String_Eq};
|
||||
import Std::Test::{Test_AssertTrue, Test_Pass};
|
||||
|
||||
func Main() -> int {
|
||||
let msg: String = Greet_Hello("Bux");
|
||||
Test_AssertTrue(String_Eq(msg, "Hello, Bux!"));
|
||||
Test_AssertTrue(String_Eq(Greet_Version(), "0.1.1"));
|
||||
PrintLine(msg);
|
||||
Test_Pass("registry_consumer");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
cd "$TMP/app"
|
||||
export BUX_STDLIB="$ROOT/lib"
|
||||
|
||||
echo "=== bux add greet ==="
|
||||
"$BUXC" add greet
|
||||
grep -q greet bux.toml
|
||||
cat bux.toml
|
||||
|
||||
echo "=== bux install ==="
|
||||
"$BUXC" install
|
||||
test -f bux.lock
|
||||
grep -q greet bux.lock
|
||||
cat bux.lock
|
||||
|
||||
echo "=== bux run ==="
|
||||
"$BUXC" run . | tee "$TMP/run.out"
|
||||
grep -q "Hello, Bux!" "$TMP/run.out"
|
||||
|
||||
echo "PASS: registry smoke (search + add + install + build)"
|
||||
Reference in New Issue
Block a user