Skip to content

Commit 8501e12

Browse files
fix: remove stale banned gen-v-connector V-lang recipe (#46)
This is the held consumer sweep following `rsr-template-repo` PR #22, which removed the banned `gen-v-connector` V-lang connector-scaffold recipe from the template. This repo carried a pre-PR#22 copy of that drift recipe. ## Removed - The `gen-v-connector` Justfile recipe (the "Generate a V-lang connector scaffold from the Groove manifest" recipe and its full body, including the `connectors/v-*/` generator and embedded `main.v` heredoc). ## Preserved - No V-lang ban-enforcement asset was touched. The repo's own ban guard (e.g. `scripts/check-no-vlang.sh`, estate-rules workflow, `6a2/PLAYBOOK.a2ml`), where present, legitimately contains the `gen-v-connector`/`vlang` string as a *detection* pattern and is left intact. - The legitimate `groove-setup` and `verify-template` recipes and the `GROOVE & V-TRIPLE SETUP` section header (which they share) are unchanged. Justfile remains syntactically valid (`just --list` succeeds). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
1 parent e306c97 commit 8501e12

1 file changed

Lines changed: 0 additions & 84 deletions

File tree

Justfile

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -356,90 +356,6 @@ verify-template:
356356
exit 1
357357
fi
358358
359-
# Generate a V-lang connector scaffold from the Groove manifest
360-
gen-v-connector:
361-
#!/usr/bin/env bash
362-
set -euo pipefail
363-
MANIFEST=".machine_readable/integrations/groove.a2ml"
364-
if [ ! -f "$MANIFEST" ]; then
365-
echo "Error: No Groove manifest. Run 'just groove-setup' first."
366-
exit 1
367-
fi
368-
369-
# Extract service name and port from manifest
370-
SERVICE=$(grep '(service "' "$MANIFEST" | head -1 | sed 's/.*"\(.*\)".*/\1/')
371-
PORT=$(grep '(port ' "$MANIFEST" | head -1 | sed 's/.*(port \([0-9]*\)).*/\1/')
372-
373-
if [ "$PORT" = "0" ] || [ -z "$PORT" ]; then
374-
echo "Error: Port not assigned. Run 'just groove-setup' first."
375-
exit 1
376-
fi
377-
378-
# Check which API surfaces are enabled
379-
REST=$(grep -q '(rest.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
380-
GRPC=$(grep -q '(grpc.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
381-
GRAPHQL=$(grep -q '(graphql.*enabled true)' "$MANIFEST" && echo "true" || echo "false")
382-
383-
OUTDIR="connectors/v-${SERVICE}"
384-
mkdir -p "${OUTDIR}/src"
385-
386-
cat > "${OUTDIR}/src/main.v" << VEOF
387-
// SPDX-License-Identifier: PMPL-1.0-or-later
388-
// V-${SERVICE} — auto-generated V-lang connector.
389-
// Generated by: just gen-v-connector
390-
// From: ${MANIFEST}
391-
392-
module v_${SERVICE//-/_}
393-
394-
import net.http
395-
import json
396-
397-
pub struct Config {
398-
pub mut:
399-
base_url string = 'http://localhost:${PORT}'
400-
}
401-
402-
pub fn new_client(config Config) &Client {
403-
return &Client{ config: config }
404-
}
405-
406-
pub fn new_default() &Client {
407-
return new_client(Config{})
408-
}
409-
410-
pub struct Client {
411-
config Config
412-
}
413-
414-
pub fn (c &Client) health() !string {
415-
resp := http.get('\${c.config.base_url}/health') or {
416-
return error('${SERVICE} unreachable: \${err}')
417-
}
418-
if resp.status_code != 200 {
419-
return error('${SERVICE} unhealthy: HTTP \${resp.status_code}')
420-
}
421-
return resp.body
422-
}
423-
424-
// Groove discovery
425-
pub fn discover() ?&Client {
426-
client := new_default()
427-
if _ := client.health() { return client }
428-
return none
429-
}
430-
431-
// TODO: Add endpoint-specific methods for your API
432-
// REST=${REST} gRPC=${GRPC} GraphQL=${GRAPHQL}
433-
VEOF
434-
435-
echo "Generated: ${OUTDIR}/src/main.v"
436-
echo " Service: ${SERVICE}"
437-
echo " Port: ${PORT}"
438-
echo " REST: ${REST}, gRPC: ${GRPC}, GraphQL: ${GRAPHQL}"
439-
echo ""
440-
echo "Next: add endpoint methods to ${OUTDIR}/src/main.v"
441-
echo "Then copy to developer-ecosystem/v-ecosystem/connectors/"
442-
443359
# ═══════════════════════════════════════════════════════════════════════════════
444360
# PROJECT SELF-ASSESSMENT
445361
# ═══════════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)