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

Releasing v3.2 #457

Closed
3 tasks
kazu-yamamoto opened this issue May 19, 2020 · 3 comments
Closed
3 tasks

Releasing v3.2 #457

kazu-yamamoto opened this issue May 19, 2020 · 3 comments
Assignees

Comments

@kazu-yamamoto
Copy link
Collaborator

kazu-yamamoto commented May 19, 2020

Breaking changes may include:

@kazu-yamamoto
Copy link
Collaborator Author

SinceStrict changes behavior, we need the following to pass tests:

diff --git a/Network/Socket/Types.hsc b/Network/Socket/Types.hsc
index 8cbe9fc..853ad0c 100644
--- a/Network/Socket/Types.hsc
+++ b/Network/Socket/Types.hsc
@@ -935,6 +935,7 @@ class SocketAddress sa where
 sockaddrStorageLen :: Int
 sockaddrStorageLen = 128
 
+{-# NOINLINE withSocketAddress #-}
 withSocketAddress :: SocketAddress sa => sa -> (Ptr sa -> Int -> IO a) -> IO a
 withSocketAddress addr f = do
     let sz = sizeOfSocketAddress addr
@@ -1050,6 +1051,9 @@ sizeOfSockAddr SockAddrUnix{}  = error "sizeOfSockAddr: not supported"
 sizeOfSockAddr SockAddrInet{}  = #const sizeof(struct sockaddr_in)
 sizeOfSockAddr SockAddrInet6{} = #const sizeof(struct sockaddr_in6)
 
+-- The combination of "-XString" and inlining results in a bug where
+-- "sz" is always 0.
+{-# NOINLINE withSockAddr #-}
 -- | Use a 'SockAddr' with a function requiring a pointer to a
 -- 'SockAddr' and the length of that 'SockAddr'.
 withSockAddr :: SockAddr -> (Ptr SockAddr -> Int -> IO a) -> IO a

@kazu-yamamoto
Copy link
Collaborator Author

For Strict, Storable instances should be defined with lazy bindings.

@eborden
Copy link
Collaborator

eborden commented May 20, 2020

I created a project for tracking progress on 3.2.0.0.

https://github.com/haskell/network/projects/5

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

No branches or pull requests

2 participants