Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler): consider entire config when hashing #350

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

tmillr
Copy link
Member

@tmillr tmillr commented Jul 15, 2024

  • Hash entire config instead of just the table passed to setup(). This helps to ensure that a re-compile occurs when overrides are set outside of setup().

  • Loading/sourcing colorscheme now causes recompilation if config or overrides have changed, even if setup() has been called before.

  • Clear vim.g.colors_name before setting vim.o.background so that colorscheme is not reloaded recursively when setting vim.o.background (as opposed to using a variable to check for nested colorscheme load, which is what we were doing before).

  • fix(compiler): always write hash to filesystem whenever a compilation occurs, incl. when require('github-theme').compile() is called directly.

Related: #262, #340, #341

@tmillr tmillr changed the title test: add compiler tests fix(compiler): consider entire config when hashing Jul 16, 2024
@tmillr tmillr force-pushed the fix-compiler branch 5 times, most recently from 9360a34 to 6825feb Compare July 16, 2024 05:06
- Hash entire config instead of just the table passed to `setup()`. This
  helps to ensure that a recompilation occurs when overrides are set
  outside of `setup()`.

- Loading/sourcing colorscheme now causes recompilation if config or
  overrides have changed, even if `setup()` has been called before.

- Clear `vim.g.colors_name` before setting `vim.o.background` so that
  colorscheme is not reloaded recursively when setting
  `vim.o.background` (as opposed to using a variable to check for nested
  colorscheme load, which is what we were doing before).

- fix(compiler): always write hash to filesystem when a compilation
  occurs, incl. when `require('github-theme').compile()` is called
  directly.

Related: projekt0n#262, projekt0n#340, projekt0n#341

Please enter the commit message for your changes. Lines starting
th '%' will be ignored, and an empty message aborts the commit.
@tmillr tmillr merged commit 52a9d4c into projekt0n:main Jul 16, 2024
25 checks passed
@tmillr tmillr deleted the fix-compiler branch July 16, 2024 05:33
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.

None yet

1 participant