Skip to content

Commit fa59e3a

Browse files
fix: remove stale banned gen-v-connector V-lang recipe (#10)
Held consumer sweep following rsr-template-repo PR #22, which removed the stale `gen-v-connector` V-lang recipe from the template. This repo carried a pre-PR#22 copy of that recipe. ## What was removed - The banned `gen-v-connector` Justfile recipe and its V-lang connector scaffold body (the `connectors/v-<service>/src/main.v` generator and its "Generate a V-lang connector scaffold" comment header). ## What was preserved - The repo's own V-lang ban-enforcement assets (e.g. `scripts/check-no-vlang.sh`, `.github/workflows/estate-rules.yml`, `6a2/PLAYBOOK.a2ml`) are intentionally left untouched — they contain the banned string only as a *detection pattern* and must stay. The Justfile remains syntactically valid (`just --list` passes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 8114d1c commit fa59e3a

1 file changed

Lines changed: 0 additions & 88 deletions

File tree

Justfile

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

0 commit comments

Comments
 (0)