Skip to content

upload clangd index to CI and download in configure#159

Merged
bates64 merged 2 commits intomainfrom
clangd-index
Mar 25, 2026
Merged

upload clangd index to CI and download in configure#159
bates64 merged 2 commits intomainfrom
clangd-index

Conversation

@bates64
Copy link
Copy Markdown
Owner

@bates64 bates64 commented Mar 25, 2026

This PR makes it so that user IDEs (at least, those that use clangd) do not need to reindex the entire project - can take a decent amount of time and memory - when they update dx or install it for the first time.

  • Add a "Build clangd index" (what's an index?) step to the nightly release workflow. This is uploaded to releases.
  • configure.py downloads the index from the appropriate github release whenever the user updates dx (nearest ancestor commit with dx-* tag moves to a new commit sha), and on first run.
  • Moved the windows toolchain to .dx/windows/ so we can avoid spamming the root directory with ephemeral state.

Build a clangd index using clangd-indexer in the nightly and release
workflows, and attach the .idx file as a GitHub release asset.

configure.py downloads the index for the matching dx-* tag on first
run, stores it in .dx/, and configures .clangd to use it as an external
index. This gives clangd project-wide symbols without a slow background
index pass, while still allowing local edits to override stale entries.
@bates64 bates64 added the ci CI/infrastructure label Mar 25, 2026
@bates64 bates64 force-pushed the clangd-index branch 5 times, most recently from ad56bb5 to 3681ddd Compare March 25, 2026 10:14
Store the downloaded toolchain in .dx/windows/ instead of
papermario-dx-windows/ at the repo root, keeping ephemeral data
together in one gitignored directory.

Also fix clangd index portability: build in YAML format and replace
absolute CI paths with a $$ROOT$$ placeholder, which configure.py
substitutes with the local project root at download time.
@bates64 bates64 merged commit 47ed57d into main Mar 25, 2026
5 checks passed
@bates64 bates64 deleted the clangd-index branch March 25, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant