Add pinned JuliaFormatter tooling and CI format check#58
Draft
garrison wants to merge 1 commit into
Draft
Conversation
Add a self-contained format/ environment that pins JuliaFormatter to an exact version (mirroring the gen/ pattern), so formatting results no longer depend on whatever JuliaFormatter is in the user's global environment. - format/Project.toml + format/Manifest.toml pin JuliaFormatter 2.8.5 - Makefile provides short `make format` / `make format-check` (plus test, gen) - CI.yml gains a "Format check" job running `make format-check` on PRs and the merge queue - AGENTS.md documents the format/ env and the make targets Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a pinned formatting setup so contributors and CI all format with the exact same JuliaFormatter version, regardless of what's installed globally.
Changes
format/— a self-contained environment that pinsJuliaFormatterto2.8.5(Project.toml[compat] = "=2.8.5"+ a committedManifest.toml). Mirrors the existinggen/pattern.Makefile— short task runner:make format— format the repo with the pinned formattermake format-check— fail (non-zero exit) if anything is unformatted; used by CImake test,make gen— convenience wrappers for the existing commands.github/workflows/CI.yml— new Format check job (Linux-only, since formatting is platform/version independent) runningmake format-checkon PRs and the merge queue.AGENTS.md— documents theformat/env and themaketargets.Why
The old instruction
julia -e 'using JuliaFormatter; format(".")'relied on whatever JuliaFormatter happened to be in the user's global environment, giving inconsistent results across contributors and CI. Pinning in a dedicated env removes that drift without polluting anyone's global environment.Notes / follow-up
main.format/Project.toml[compat], runjulia --project=format -e 'import Pkg; Pkg.update()', and commit the updatedformat/Manifest.toml.🤖 Generated with Claude Code