tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

Add an `hpack` pre-commit hook #177

Closed Niols closed 1 year ago

Niols commented 1 year ago

Somehow, the default hpack hook does not work for us, so we write our own, which we call hpack-sync so as not to clash with the default. Only the first commit matters. The others will be there for testing purposes.

Niols commented 1 year ago

I marked it as draft because there are still things I do not understand about this hpack hook. Besides, upstream seems to answer pretty fast so I will try to push a solution there rather than a custom one in Pirouette.

Niols commented 1 year ago

Let's believe in it; new round of tests!

Niols commented 1 year ago

Tests successful! If you have a look at the flake checks, you'll see that every time I “break” one of the file (that is I get them out of sync), the CI complains, as expected. As soon as they are back in sync, CI is happy.

Niols commented 1 year ago

I just opened the PR https://github.com/cachix/pre-commit-hooks.nix/pull/236 that should bring this fixed version of the hpack hook upstream. We will potentially iterate there on better versions but, eventually, we should settle things there. We can either wait for that to update the current PR or merge and update later on. Personally, I would go for the latter.

Niols commented 1 year ago

Now uses upstream's hpack. I think everything is ready to merge.

Niols commented 1 year ago

@gabrielhdt WDYT?