-
Notifications
You must be signed in to change notification settings - Fork 67
Fix CI #147
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
Fix CI #147
Conversation
3443fe0
to
9b5a615
Compare
I fixed CI errors that caused |
binary.cabal
Outdated
@@ -162,6 +162,7 @@ benchmark generics-bench | |||
build-depends: | |||
base >= 4.5.0.0 && < 5, | |||
bytestring >= 0.10.4, | |||
generic-deriving >= 0.10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the benchmark already depended on generic-deriving
transitively. That's what caused one of the problems, as both generic-deriving
and GenericsBenchTypes
used to define instance Generic Version
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good and non-obvious info, please add that as a comment in the file.
And add how exactly we already depend on generic-deriving, which package depends on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
criterion
depends on it via aeson
.
Hey! I'll take a look within a few days. Thanks a lot for fixing this! |
.travis.yml
Outdated
@@ -33,7 +33,10 @@ install: | |||
- cabal sandbox init | |||
# can't use "cabal install --only-dependencies --enable-tests --enable-benchmarks" due to dep-cycle. | |||
# must split in two separate 'cabal install's since cabal doesn't update the cabal library before it's needed in 'cabal-version' constraints. | |||
- cabal install "bytestring >= 0.10.4" 'Cabal == 1.24.*' -j | |||
- cabal install "bytestring >= 0.10.4" -j |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Maybe we should just install CABALVER=1.24 right away instead of upgrading later.
I can't remember why I made it install an older version (the one shipped with Haskell Platform, iirc) and then upgrade it.
So instead of adding CABALUPGR, does it work to just change CABALVER?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, let me see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, errors out https://travis-ci.org/kolmodin/binary/builds/388723151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember why I made it install an older version (the one shipped with Haskell Platform, iirc) and then upgrade it.
The version of cabal-install
actually doesn't matter, it's about the version of Cabal
the lib that is shipped with GHC.
8431f68
to
a867271
Compare
I decided to also add GHC 8.2 and 8.4 to CI — now the problem is that Cabal 1.24.* which is needed for the benchmark doesn't work on 8.4, and the benchmark doesn't work with Cabal 2.2.* My plan is to copy-paste (or "vendor" to use the modern jargon) some bits of Cabal 1.24.* to the benchmark so it's no longer a dependency of |
Turns out copying the entire |
Ah, now I recall, it's part of the benchmark suite. What are some candidates for benchmarking binary? Cabal was good because it's real world code. Maybe good to write some custom code to try parsing trees, lists, small and large structs. |
711c2d6
to
85ba13f
Compare
I found a way to have our cake and eat it too: instead of depending on Cabal, I copied data types from it (only 360 lines) and committed a compressed Hackage index to the repo. The benchmark reads the data from this file. This gives us a benchmark with real world code and real world data. I also added comments explaining the difference between the current solution and the old one. Unfortunately, I couldn't get rid of |
Ok, that looks like a good trade off. Thanks for doing this! |
also fixes #142