k0001 / network-simple

Haskell library abstracting common network sockets usage patterns.
BSD 3-Clause "New" or "Revised" License
33 stars 9 forks source link

Updated dependencies #31

Closed jasagredo closed 5 years ago

jasagredo commented 5 years ago

As stated in their hackage description:

In network-3.0.0.0 the Network.BSD module was split off into its own package, network-bsd-3.0.0.0.

Therefore, the dependency on network (>=2.3) is way too relaxed. This leads to failing builds as just happened to me:

$ cabal new-build                  
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - basement-0.0.10 (lib) (requires build)
 - cereal-0.5.8.1 (lib) (requires build)
 - hsc2hs-0.68.4 (exe:hsc2hs) (requires build)
 - transformers-compat-0.6.5 (lib) (requires build)
 - network-3.1.0.0 (lib:network) (requires build)
 - exceptions-0.10.2 (lib) (requires build)
 - socks-0.6.0 (lib) (requires build)
 - safe-exceptions-0.1.7.0 (lib) (requires build)
 - network-simple-0.4.4 (lib) (dependency rebuilt)
Starting     cereal-0.5.8.1 (lib)
Starting     hsc2hs-0.68.4 (exe:hsc2hs)
Starting     transformers-compat-0.6.5 (lib)
Starting     basement-0.0.10 (lib)
Building     cereal-0.5.8.1 (lib)
Building     transformers-compat-0.6.5 (lib)
Building     hsc2hs-0.68.4 (exe:hsc2hs)
Building     basement-0.0.10 (lib)
Installing   transformers-compat-0.6.5 (lib)
Completed    transformers-compat-0.6.5 (lib)
Starting     exceptions-0.10.2 (lib)
Building     exceptions-0.10.2 (lib)
Installing   exceptions-0.10.2 (lib)
Completed    exceptions-0.10.2 (lib)
Starting     safe-exceptions-0.1.7.0 (lib)
Building     safe-exceptions-0.1.7.0 (lib)
Installing   safe-exceptions-0.1.7.0 (lib)
Installing   hsc2hs-0.68.4 (exe:hsc2hs)
Completed    hsc2hs-0.68.4 (exe:hsc2hs)
Starting     network-3.1.0.0 (all, legacy fallback)
Completed    safe-exceptions-0.1.7.0 (lib)
Building     network-3.1.0.0 (all, legacy fallback)
Installing   cereal-0.5.8.1 (lib)
Completed    cereal-0.5.8.1 (lib)
Installing   network-3.1.0.0 (all, legacy fallback)
Completed    network-3.1.0.0 (all, legacy fallback)
Installing   basement-0.0.10 (lib)
Completed    basement-0.0.10 (lib)
Starting     socks-0.6.0 (lib)
Building     socks-0.6.0 (lib)
Installing   socks-0.6.0 (lib)
Completed    socks-0.6.0 (lib)
Preprocessing library for network-simple-0.4.4..
Building library for network-simple-0.4.4..
[1 of 2] Compiling Network.Simple.Internal ( src/Network/Simple/Internal.hs, /home/javier/network-simple/dist-newstyle/build/x86_64-linux/ghc-8.6.5/network-simple-0.4.4/build/Network/Simple/Internal.o )

src/Network/Simple/Internal.hs:24:1: error:
    Could not find module ‘Network.BSD’
    Use -v to see a list of the files searched for.
   |
24 | import qualified Network.BSD as NS (getServicePortNumber)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This PR updates de dependencies to support the package split.

Also, as I'm not a user of Nix, I have no idea if any other changes are required. Maybe add network-bsd to pkg.nix.

k0001 commented 5 years ago

@Jasagredo thanks for this! However, we need to support some previous versions of network, since they are still in widespread use. I think following the advice in https://hackage.haskell.org/package/network-bsd-2.8.1.0 is a sensible choice. That is:

network (>=2.7)
network-bsd (>=2.7)
jasagredo commented 5 years ago

I'm perfectly okey with that constraints. If you tell me if something else is needed (the nix part is obscure for me) I'll gladly fix the PR.

k0001 commented 5 years ago

That should be fine. I'll merge it as soon as you submit those changes, and I'll try building here with different network versions just in case. Thanks!!!

jasagredo commented 5 years ago

Ready to merge.

k0001 commented 5 years ago

Thanks! I'll upload this to Hackage as soon as successfully build it here with different network versions.