Skip to content

Add developer helpers in Go - #5

Merged
Leitwolf11 merged 4 commits into
mainfrom
build/helpers
Oct 22, 2026
Merged

Leitwolf11 merged 4 commits into
mainfrom
build/helpers

Conversation

@Leitwolf11

Copy link
Copy Markdown
Contributor

Adds the developer helpers the Tala repository has, as one Go module in helpers/ (Cobra, PTerm), with go.work at the root so they run from the checkout root. helpers/README.md documents 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, check per component with the commands of the CI workflow; check first 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.gz whose entries carry the commit time, with a .sha256), coverage (HPC, JaCoCo), format (Spotless), lint (HLint), clean [--all] [--dry-run].
  • version (show; check a release; --set with the changelog), release-notes, 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 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.go differs between talafmt, talalint and tala-analyzer; here develop pin knows 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 test over the module, verify-helpers, verify-docs, develop doctor|version|pin|clean --dry-run, and develop bundle, whose staged talalint answered --version with 0.1.0.

Leitwolf11 and others added 3 commits October 22, 2026 04:00
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>
@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@Leitwolf11

Copy link
Copy Markdown
Contributor Author

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.

@Leitwolf11
Leitwolf11 merged commit 83835b6 into main Oct 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants