circuithub / rel8

Hey! Hey! Can u rel8?
https://rel8.readthedocs.io
Other
150 stars 38 forks source link

Add inet DBType #227

Closed JonathanLorimer closed 1 year ago

JonathanLorimer commented 1 year ago

This PR adds a DBType instance for NetAddr IP, which is the default type that hasql uses for the postgres inet type. In the future I would also like to add support for SockAddr from the network package.

I'm a new committer and would appreciate any feedback, especially nitpicks and stylistic comments.

As a side note, I was wondering if you have a public nix cache. I am trying to set up my dev environment to test, but haskell.nix is trying to rebuild the world!

shane-circuithub commented 1 year ago

This looks good to me. I didn't know Postgres natively supported IP address types, but it makes sense to map them to the same type that hasql uses. I guess this means we should bump the lower bound on our hasql dependency to 1.6.1.2 because it looks like that's when support for this was added to hasql.

ocharles commented 1 year ago

Yep, that sounds good to me. @JonathanLorimer if you could change that lower bound, we'll get this merged. Thanks for your contribution!

ocharles commented 1 year ago

As a side note, I was wondering if you have a public nix cache. I am trying to set up my dev environment to test, but haskell.nix is trying to rebuild the world!

You should be able to cachix use rel8

JonathanLorimer commented 1 year ago

You should be able to cachix use rel8

unfortunately I get this when I run cachix use rel8: Binary cache rel8 doesn't exist or it's private and you don't have access it

but I just did nix-shell -p ghc cabal-install postgresql ghcid and I got things working

JonathanLorimer commented 1 year ago

@shane-circuithub or @ocharles can you approve the workflow? Tests are passing locally.