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

hooks: fix rome and nixfmt migrations #515

Merged
merged 1 commit into from
Oct 13, 2024
Merged

hooks: fix rome and nixfmt migrations #515

merged 1 commit into from
Oct 13, 2024

Conversation

sandydoo
Copy link
Member

I've decided to go with the "duplicate the thing and move on" migration approach. Here's why:

  1. hooks.nix doesn't operate at the submodule level. Migrations need to be added to the hooks submodule in pre-commit.nix, which is a bit of a mess.

  2. mkAliasOptionModule and mkRenamedOptionModule work (with the above caveat). However, the former makes it impossible AFAIKT to implement warnings because of the two-way aliasing, and the latter will always spew warnings when we eval enable.

  3. Once we split up hooks.nix and have each hook in a separate module, I think we can revisit hook migrations. Until then, the dumb solution is better than a half-baked smart one.

Fixes #507. Sort of. For now.

I've decided to go with the "duplicate the thing and move on" migration approach.
Here's why:

1. `hooks.nix` doesn't operate at the submodule level.
   Migrations need to be added to the hooks submodule in `pre-commit.nix`, which is a bit of a mess.

2. `mkAliasOptionModule` and `mkRenamedOptionModule` work (with the above caveat).
   However, the former makes it impossible AFAIKT to implement warnings because of the two-way aliasing, and the latter will always spew warnings when we eval `enable`.

3. Once we split up `hooks.nix` and have each hook in a separate module, I think we can revisit hook migrations.
   Until then, the dumb solution is better than a half-baked smart one.
@domenkozar domenkozar merged commit 7106561 into master Oct 13, 2024
8 checks passed
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.

Implement proper migrations for renamed hooks
2 participants