Repository navigation
Add developer helpers in Go - #5
Conversation
The repository gets the helpers the Tala repository has, as one Go module in helpers/ (Cobra, PTerm) with go.work at the root: - develop: doctor (tools and versions against CI), build, test and check per component with the commands of the CI workflow, run, bundle (stage the executable with the license and notes, run it with --version, pack a .zip or .tar.gz whose entries carry the commit time, with a .sha256), coverage (HPC and JaCoCo), format (Spotless), lint (HLint), clean, version (show, check a release, --set with the changelog), release-notes, and pin (list or move the source-repository-package pins; tags resolved with git ls-remote). On Windows Cabal runs with core.longpaths set through Git's environment configuration. - prebuild: check or install Go, Git, GHCup with GHC 9.10.3 and Cabal 3.16.1.0, and Temurin JDK 25, with winget, Homebrew, apt or dnf; GHCup comes from its bootstrap script pinned by commit and SHA-256. - repo-info, verify-docs (relative Markdown links and anchors, and Haddock coverage on request), verify-helpers, and githelper. Only internal/project/current.go differs between the tool repositories. CI gains a Go helpers job (Ubuntu, Windows) in CI Required, and the Haskell job bundles every host and uploads the archives; CodeQL analyses Go; Renovate updates the Go module. Verified: go vet and go test over the module, verify-helpers, verify-docs, develop version and pin (tala and talafmt), and develop bundle, whose staged talalint answered --version with 0.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
develop version <x.y.z> listed only the local tags, so a tag made on GitHub and not fetched yet passed as new. It now also asks origin with git ls-remote --tags, and the tests cover a tag that only origin has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Go extractor found no code: its build tracer on Linux recognises `go build` but not `go -C helpers build`, so the traced build extracted nothing. The step now runs `go build -a ./...` with helpers/ as its working directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
|
Self-review of the diff. helpers/ is one Go module whose only repository-specific file is internal/project/current.go; every command parses its arguments before it opens the checkout or starts a program, which the tests check for each invalid form. build/test/check run exactly the commands of ci.yml; bundle stages, runs --version and packs deterministically (same SHA-256 twice locally); version asks origin as well as the local tags; pin resolves tags to commits with git ls-remote and refuses an option-looking reference. prebuild keeps the hash-pinned GHCup bootstrap and installs the GHC and Cabal versions CI uses. CI: the Go helpers job is in CI Required, the Haskell job uploads a bundle per host, CodeQL builds the helpers from their directory so the Go tracer sees the build. All 15 checks pass on a branch current with main. |
Adds the developer helpers the Tala repository has, as one Go module in
helpers/(Cobra, PTerm), withgo.workat the root so they run from the checkout root.helpers/README.mddocuments every command.develop
doctor: finds every tool, reads its version and compares it with what CI uses (GHC 9.10.3, Cabal 3.16, JDK 25, Go 1.26).build,test,checkper component with the commands of the CI workflow;checkfirst verifies that every version file agrees and every pin is a full commit.run,bundle(stages the executable with the license and notes, runs it with--version, packs a.zip/.tar.gzwhose entries carry the commit time, with a.sha256),coverage(HPC, JaCoCo),format(Spotless),lint(HLint),clean [--all] [--dry-run].version(show; check a release;--setwith the changelog),release-notes,pin(list or move thesource-repository-packagepins; tags resolved withgit ls-remote).core.longpathsset through Git's environment configuration.prebuild checks or installs Go, Git, GHCup with GHC 9.10.3 and Cabal 3.16.1.0, and Temurin JDK 25 with winget, Homebrew, apt or dnf; GHCup comes from its bootstrap script pinned by commit and SHA-256.
repo-info, verify-docs (relative Markdown links and anchors; Haddock coverage on request), verify-helpers and githelper complete the set.
Only
internal/project/current.godiffers between talafmt, talalint and tala-analyzer; heredevelop pinknows both pins, tala and talafmt.CI: a Go helpers job (Ubuntu, Windows) joins CI Required; the Haskell job bundles every host and uploads the archives; CodeQL analyses Go; Renovate updates the Go module.
Verified locally:
go vet/go testover the module,verify-helpers,verify-docs,develop doctor|version|pin|clean --dry-run, anddevelop bundle, whose staged talalint answered--versionwith 0.1.0.