Skip to content

Add inet DBType#227

Merged
ocharles merged 7 commits intocircuithub:masterfrom
JonathanLorimer:jonathan/add-ip-type
Apr 14, 2023
Merged

Add inet DBType#227
ocharles merged 7 commits intocircuithub:masterfrom
JonathanLorimer:jonathan/add-ip-type

Conversation

@JonathanLorimer
Copy link
Copy Markdown
Contributor

@JonathanLorimer JonathanLorimer commented Mar 7, 2023

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!

@JonathanLorimer JonathanLorimer marked this pull request as ready for review March 7, 2023 08:27
@shane-circuithub
Copy link
Copy Markdown
Contributor

shane-circuithub commented Mar 23, 2023

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
Copy link
Copy Markdown
Contributor

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

@ocharles
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

JonathanLorimer commented Mar 25, 2023

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
Copy link
Copy Markdown
Contributor Author

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

@ocharles ocharles enabled auto-merge (squash) April 14, 2023 09:40
@ocharles ocharles merged commit ecf34ae into circuithub:master Apr 14, 2023
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.

3 participants