Skip to content

fix: harden generate color data extraction - #95

Merged
reobin merged 4 commits into
mainfrom
fix/generate-color-data
Aug 31, 2026
Merged

fix: harden generate color data extraction#95
reobin merged 4 commits into
mainfrom
fix/generate-color-data

Conversation

@reobin

@reobin reobin commented Aug 28, 2026

Copy link
Copy Markdown
Member

the generate job could lose all extracted color data when one group used a numeric rgb value, and larger repositories could exceed extractor.nvim's per-run limit.

the root causes live in extractor.nvim: vimcolorschemes/extractor.nvim#7 makes hexCode always a #RRGGBB string, raises errors instead of returning silently, drops the 100-colorscheme cap, and encodes an empty extraction as {}. this pr hardens the worker around that contract, so it merges after extractor.nvim#7.

  • extracts in deterministic batches, sized to stay under the per-run timeout
  • filters out built-in colorschemes before extraction, with stable ordering
  • runs extractor calls under pcall and turns failures into a nonzero nvim exit, streaming stderr
  • parses extractor output, failing the run on empty or malformed content (the extractor always writes at least {})
  • drops the autocmd-based extraction from vim/init.lua
  • adds coverage for parsing, batching, and filtering behavior

@reobin reobin self-assigned this Aug 28, 2026
extractor.nvim#7 fixes the hex code format, silent failures, the colorscheme cap, and empty output encoding at the source, so the worker side comes off.
@reobin
reobin marked this pull request as ready for review August 31, 2026 17:52
the extractor fixes cover both cases, so the worker-side guards come off and a broken run surfaces as an error.
@reobin
reobin merged commit 1835c77 into main Aug 31, 2026
3 checks passed
@reobin
reobin deleted the fix/generate-color-data branch August 31, 2026 18:15
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.

1 participant