Open mouse07410 opened 2 years ago
I cannot reproduce this. "tls" is surely in the dependency in "quic.cabal".
Perhaps, tls
dependency you mentioned relies on some C library or package being installed in a certain place, and is unable to locate it?
No C libraries are necessary.
Clean fresh clone. Forgot to mention - all the builds on this machine are dynamic. Perhaps, your reproducing was for static-only? From experience, there is a difference between compiling/building everything static, building just one package dynamic with everything else on the system being static, and building everything on the system dynamic (like my installation does). I strongly suspect your tests do not cover the last option, and probably not the second one either.
Build succeeds, giving a bunch of warnings:
$ cabal build
Build profile: -w ghc-9.2.3 -O1
In order, the following will be built (use -v for more details):
- base16-bytestring-1.0.2.0 (lib) (requires build)
- basement-0.0.14 (lib) (requires build)
- byteorder-1.0.4 (lib:byteorder) (requires build)
. . .
[58 of 88] Compiling Network.QUIC.Connection.Types ( Network/QUIC/Connection/Types.hs, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Connection/Types.o, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Connection/Types.dyn_o )
Network/QUIC/Connection/Types.hs:338:5: warning: [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘Maybe CID’ not matched: Nothing
|
338 | Just myCID = initSrcCID myAuthCIDs
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Network/QUIC/Connection/Types.hs:339:5: warning: [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘Maybe CID’ not matched: Nothing
|
339 | Just peerCID = initSrcCID peerAuthCIDs
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[59 of 88] Compiling Network.QUIC.Connection.Timeout ( Network/QUIC/Connection/Timeout.hs, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Connection/Timeout.o, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Connection/Timeout.dyn_o )
windowsThreadBlockHack (Network/QUIC/Windows.hs:9)
. . .
[88 of 88] Compiling Network.QUIC.Internal ( Network/QUIC/Internal.hs, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Internal.o, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/build/Network/QUIC/Internal.dyn_o )
Preprocessing library for quic-0.0.1..
Running Haddock on library for quic-0.0.1..
100% ( 41 / 41) in 'Network.QUIC'
100% ( 18 / 18) in 'Network.QUIC.Server'
100% ( 23 / 23) in 'Network.QUIC.Client'
11% ( 67 /568) in 'Network.QUIC.Internal'
Missing documentation for:
Module header
. . .
nextPacketNumber (Network/QUIC/Connection/PacketNumber.hs:17)
Warning: Network.QUIC.Internal: could not find link destinations for:
- Network.QUIC.Crypto.Nite.NiteEncrypt
- Network.QUIC.Crypto.Nite.NiteDecrypt
Documentation created:
/Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/doc/html/quic/index.html,
/Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/doc/html/quic/quic.txt
$
\
Subsequent tests fail:
$ cabal test
. . .
[1 of 1] Compiling Main ( test/doctests.hs, /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/t/doctests/build/doctests/doctests-tmp/Main.dyn_o )
Linking /Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/t/doctests/build/doctests/doctests ...
Running 1 test suites...
Test suite doctests: RUNNING...
Installing hspec-core-2.10.0 (lib)
Completed hspec-core-2.10.0 (lib)
Starting hspec-2.10.0 (lib)
Building hspec-2.10.0 (lib)
Network/QUIC/Types/Error.hs:5:1: error:
Could not find module ‘Network.TLS’
Perhaps you meant Network.URI (from network-uri-2.6.4.1)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
Network/QUIC/Types/Error.hs:6:1: error:
Could not find module ‘Network.TLS.QUIC’
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
./Network/QUIC/Packet/Number.hs:13: failure in expression `encodePacketNumber 0xabe8bc 0xac5c02 == (0x5c02,2)'
expected: True
but got:
^
<interactive>:27:1: error:
Variable not in scope: encodePacketNumber :: t0 -> t1 -> (a0, b0)
./Network/QUIC/Packet/Number.hs:34: failure in expression `decodePacketNumber 0xabe8bc 0x5c02 2 == 0xac5c02'
expected: True
but got:
^
<interactive>:33:1: error:
Variable not in scope: decodePacketNumber :: t0 -> t1 -> t2 -> a0
./Network/QUIC/Types/Integer.hs:22: failure in expression `import Network.QUIC.Utils'
expected:
but got:
^
<no location info>: error:
Could not find module ‘Network.QUIC.Utils’
It is not a module in the current program, or in any known package.
Examples: 28 Tried: 16 Errors: 0 Failures: 3
Test suite doctests: FAIL
Test suite logged to:
/Users/ur20980/src/quic/dist-newstyle/build/x86_64-osx/ghc-9.2.3/quic-0.0.1/t/doctests/test/quic-0.0.1-doctests.log
0 of 1 test suites (0 of 1 test cases) passed.
Haddock hspec-2.10.0 (lib)
Installing hspec-2.10.0 (lib)
Completed hspec-2.10.0 (lib)
cabal: Tests failed for test:doctests from quic-0.0.1.
Also, I saw nowhere in the code definition of module Network.TLS.QUIC
. I assume that network
package does not provide it - otherwise why would one need this package?
Cabal-3.6.2.0, GHC-9.2.3 (as shown above).