Context
In #406 we rolled the ONNX Runtime back to 1.24.2 and pinned github.com/yalue/onnxruntime_go to v1.27.0 because the C API headers in onnxruntime_go require a matching runtime version. The version is currently repeated in several places that can drift independently:
go.mod (onnxruntime_go version, which implicitly dictates the runtime version)
docs/02-development-guide.md (download URLs, cp targets, verify step, env var)
- The downloaded/copied shared library filename (
libonnxruntime.1.24.2.dylib, libonnxruntime.so.1.24.2)
- Any CI / build scripts that fetch the runtime
Goal
Define a single source of truth for the ONNX Runtime version so the Go module, the shared library on disk, the docs, and CI cannot drift apart.
Possible approaches
- A
Makefile / build-script variable (e.g. ONNXRUNTIME_VERSION) consumed by install scripts, CI, and a docs-generation step.
- A
.tool-versions (or similar) entry, with docs referencing the variable rather than a literal version.
- A small helper script that downloads the correct runtime based on the pinned
onnxruntime_go version.
Acceptance criteria
- Bumping the ONNX Runtime version requires editing exactly one place.
- Docs, install scripts, and CI all derive the version from that single source.
- A check (CI or pre-commit) fails if the versions diverge.
Context
In #406 we rolled the ONNX Runtime back to
1.24.2and pinnedgithub.com/yalue/onnxruntime_gotov1.27.0because the C API headers inonnxruntime_gorequire a matching runtime version. The version is currently repeated in several places that can drift independently:go.mod(onnxruntime_goversion, which implicitly dictates the runtime version)docs/02-development-guide.md(download URLs,cptargets, verify step, env var)libonnxruntime.1.24.2.dylib,libonnxruntime.so.1.24.2)Goal
Define a single source of truth for the ONNX Runtime version so the Go module, the shared library on disk, the docs, and CI cannot drift apart.
Possible approaches
Makefile/ build-script variable (e.g.ONNXRUNTIME_VERSION) consumed by install scripts, CI, and a docs-generation step..tool-versions(or similar) entry, with docs referencing the variable rather than a literal version.onnxruntime_goversion.Acceptance criteria