Skip to content

Conversation

Copy link

Copilot AI commented Oct 19, 2025

This PR addresses two build and CI requirements:

1. Skip editorconfig format checking for oci-go files

The editorconfig-checker CI workflow was attempting to validate Go source files in the oci-go/ directory against the repository's editorconfig rules. Since these are Go files with their own formatting conventions (managed by go fmt), they should be excluded from the editorconfig checks.

Change: Added oci-go/ to the exclude pattern in .ecrc configuration file.

2. Make Go build optional when Go compiler is not found

Previously, the build system would fail or behave incorrectly when the Go compiler was not available, even though OCI functionality is optional. The code unconditionally included OCI headers and functions, causing compilation errors when the Go-generated library was missing.

Changes:

  • Modified common/CMakeLists.txt to conditionally compile oci.cpp and oci.h only when Go compiler is found
  • Added LLAMA_USE_OCI compile definition when Go is available
  • Wrapped OCI code in oci.h, oci.cpp, and arg.cpp with #ifdef LLAMA_USE_OCI guards

Behavior:

  • With Go compiler: OCI functionality is built and available (liboci.a is compiled from Go sources)
  • Without Go compiler: Build succeeds with a warning message, OCI functionality is disabled

Testing

✅ Build succeeds with Go compiler (OCI enabled)
✅ Build succeeds without Go compiler (OCI disabled)
✅ Core test suite passes
✅ Editorconfig-checker properly excludes oci-go files

Files Changed

  • .ecrc: Added oci-go/ to exclude list
  • common/CMakeLists.txt: Conditional compilation of OCI sources
  • common/oci.h, common/oci.cpp: Added conditional compilation guards
  • common/arg.cpp: Conditionally include and use OCI functionality

Total: 5 files changed, 22 insertions(+), 5 deletions(-)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ggml.ai
    • Triggering command: /home/REDACTED/work/llama.cpp/llama.cpp/build/bin/test-arg-parser (dns block)
    • Triggering command: ./build/bin/test-arg-parser (dns block)
  • huggingface.co
    • Triggering command: /usr/lib/git-core/git-remote-https origin REDACTED (dns block)
    • Triggering command: /home/REDACTED/work/llama.cpp/llama.cpp/build/bin/test-thread-safety -hf ggml-org/models -hff tinyllamas/stories15M-q4_0.gguf -ngl 99 -p The meaning of life is -n 128 -c 256 -ub 32 -np 4 -t 2 (dns block)
    • Triggering command: /home/REDACTED/work/llama.cpp/llama.cpp/build/bin/llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K.gguf --model stories260K.gguf --prompt hello --seed 42 -ngl 0 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Tell editorconfig CI Github Actions build to skip format checking for files in oci-go. If a go compiler isn't found don't build the golang code in llama.cpp


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

ericcurtin and others added 2 commits October 19, 2025 19:11
So we can pull from any OCI registry, add authentication, etc.

Add docker-style progress bars and resumable downloads to OCI pulls

Update documentation with progress bars and resumable downloads info

Signed-off-by: Eric Curtin <[email protected]>
Copilot AI changed the title [WIP] Update CI to skip format checking for oci-go files Make OCI Go build optional and skip editorconfig for oci-go Oct 19, 2025
Copilot AI requested a review from ericcurtin October 19, 2025 18:52
Copilot finished work on behalf of ericcurtin October 19, 2025 18:52
@ericcurtin ericcurtin force-pushed the integrate-go-containerregistry-library branch 7 times, most recently from e4b192d to 2935963 Compare October 19, 2025 20:47
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