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

Bump obelisk for GHC 8.6 #95

Merged
merged 30 commits into from
Nov 22, 2019
Merged

Bump obelisk for GHC 8.6 #95

merged 30 commits into from
Nov 22, 2019

Conversation

3noch
Copy link
Collaborator

@3noch 3noch commented Aug 24, 2019

I merged obelisk/develop into obelisk/cg-fullroute and then bumped the thunk here.

@3noch 3noch requested a review from ali-abrar August 24, 2019 22:46
@ali-abrar
Copy link
Member

Not so easy to review this - I'll come back after checking out cg-full-route on obelisk independently. Perhaps rhyolite can go back to develop of ob.

@3noch
Copy link
Collaborator Author

3noch commented Aug 26, 2019

Yeah. Note that rhyolite was already on cg-full-route.

@3noch
Copy link
Collaborator Author

3noch commented Aug 26, 2019

I've successfully run the obelisk skeleton with this change.

@3noch 3noch changed the title Bump obelisk Bump obelisk for GHC 8.6 Sep 4, 2019
@3noch 3noch mentioned this pull request Sep 4, 2019
@3noch
Copy link
Collaborator Author

3noch commented Sep 4, 2019

I have a skeleton app using rhyolite-backend and rhyolite-frontend and everything builds. If an app bumps to this branch and does some testing that would help confirm all these changes are working.

@3noch
Copy link
Collaborator Author

3noch commented Sep 4, 2019

@ali-abrar This is ready for some review.

@ali-abrar
Copy link
Member

Could you also update the changelog? Apart from the bump, it might be worth mentioning the improved error messaging.

@3noch
Copy link
Collaborator Author

3noch commented Sep 4, 2019

"Improved error messaging" is one way to say it... Perhaps I should have used fail from MonadFail but that would require pushing MonadFail m constraints everywhere.... also I'm fairly confident that error is equivalent to fail in most of the monads we are using anyway...

@3noch
Copy link
Collaborator Author

3noch commented Sep 4, 2019

Ideally we'd get these two branches merged first:

I find it annoying to depend on branches of dependencies because it makes bumping much less obvious to the next guy.

default.nix Outdated Show resolved Hide resolved
@Ericson2314
Copy link
Member

Someday it might be nice to use MonadError for those, but at that point we'd want to get postgresql-simple exceptions and stick them in the same error type. Or in the meantime there's some postgresql-simple exception type that can be reused (as something thrown not MonadError) for this.

CC @lpsmith

@benkolera
Copy link

Just in case you didn't know, @ali-abrar (just delete this comment if I'm speaking the obvious! 🙂) , that latest bump of vessel you did here brought in obsidiansystems/vessel@fa472dc which seems to be a little tight on it's version bounds. The build for this MR is currently broken:

Configuring vessel-0.1.0.0...
Setup: Encountered missing dependencies:
QuickCheck ==2.13.*, aeson >=1.4.4 && <1.5, these >=1.0.1 && <1.1

Are there actual bugs / new features that vessel is depending on in QuickCheck > 2.12.6.1 , Aeson > 1.4.2.0 or these > 1? Fwiw, I relaxed these bounds on my project with a bunch of unpacked thunks and it seemed to build.

Here is where everything is at and what I changed to get it building.

bkolera at bkolera in ~/src/github/benkolera/cogitate/.obelisk/impl (cg-fullroute●) 
$ git rev-parse HEAD
64f5c928a5e6c39dcc450005e5cffa6d11968a8b

bkolera at bkolera in ~/src/github/benkolera/cogitate/.obelisk/impl/dep/reflex-platform (aa-split-these●) 
$ git rev-parse HEAD
4b4a2c8679d6f3042180d2974b31c43bfc506b91

bkolera at bkolera in ~/src/github/benkolera/cogitate/.obelisk/impl/dep/reflex-platform (aa-split-these●) 
$ git diff | tee 
diff --git a/haskell-overlays/untriaged.nix b/haskell-overlays/untriaged.nix
index eaf987c..b1a3e73 100644
--- a/haskell-overlays/untriaged.nix
+++ b/haskell-overlays/untriaged.nix
@@ -82,7 +82,7 @@ in self: super: {
 
   # Packages not yet in 19.03
   semialign = doJailbreak (self.callHackage "semialign" "1" {});
-  these = self.callHackage "these" "1" {};
+  these = self.callHackage "these" "1.0.1" {};
 
   ########################################################################
   # Packages not in hackage
diff --git a/nixpkgs-overlays/all-cabal-hashes/default.nix b/nixpkgs-overlays/all-cabal-hashes/default.nix
index 1a6686a..dd3d80c 100644
--- a/nixpkgs-overlays/all-cabal-hashes/default.nix
+++ b/nixpkgs-overlays/all-cabal-hashes/default.nix
@@ -1,8 +1,8 @@
 self: _: {
 
   all-cabal-hashes = self.fetchurl {
-    url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/5e782dacf8d2d603f3848cfa37561acba313fbd5.tar.gz";
-    sha256 = "0cms0z38fcmrzplhzl34d3cm7hs8kr4z8p5cnxvhhjm7mf7357z7";
+    url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/17df7a8cee55da9518109cc08f3cbecd3afc2062.tar.gz";
+    sha256 = "0s2g057h7661w4aaaakg8hfmgwaz7ayq8phfnjv9rpjyfndmr3sd";
   };
 
 }

bkolera at bkolera in ~/src/github/benkolera/cogitate/dep/rhyolite (eac@bump-obelisk●●) 
$ git rev-parse HEAD
d162e25ba76aa279f604724c43d680c9646f4e70

bkolera at bkolera in ~/src/github/benkolera/cogitate/dep/rhyolite/dep/vessel (develop●) 
$ git rev-parse HEAD
8469dd1ffbe0e6640c0d1c1f417a49ae8d10b06e

bkolera at bkolera in ~/src/github/benkolera/cogitate/dep/rhyolite/dep/vessel (develop●) 
$ git diff | tee                        
diff --git a/vessel.cabal b/vessel.cabal
index 79866a5..45e5b1f 100644
--- a/vessel.cabal
+++ b/vessel.cabal
@@ -20,7 +20,7 @@ library
   exposed-modules:     Data.Vessel
   other-extensions:    FlexibleInstances, GeneralizedNewtypeDeriving, RankNTypes, ScopedTypeVariables, StandaloneDeriving, TypeFamilies, UndecidableInstances
   build-depends:       base >=4.9 && <4.13
-                     , aeson >= 1.4.4 && < 1.5
+                     , aeson >= 1.4.0 && < 1.5
                      , bifunctors >= 5.5 && < 5.6
                      , containers >= 0.6 && < 0.7
                      , constraints >= 0.10 && < 0.11
@@ -34,7 +34,7 @@ library
                      , reflex >= 0.6.2.4 && < 0.7
                      , semialign >= 1
                      , these >= 1.0.1 && < 1.1
-                     , QuickCheck >= 2.13 && < 2.14
+                     , QuickCheck >= 2.12 && < 2.14
                      , witherable >= 0.2 && <= 0.3.2
   hs-source-dirs:      src
   default-language:    Haskell2010

default.nix Outdated Show resolved Hide resolved
dep/dependent-sum-aeson-orphans/github.json Outdated Show resolved Hide resolved
dep/postgresql-lo-stream/github.json Outdated Show resolved Hide resolved
dep/vessel/github.json Outdated Show resolved Hide resolved
@ali-abrar
Copy link
Member

@benkolera Those version bounds were generated by cabal. They'll need to be extended.

@ali-abrar
Copy link
Member

Alright, vessel is good to go now. There's still the groundhog fork to update.

@3noch
Copy link
Collaborator Author

3noch commented Sep 8, 2019

In general I could convert some of these to callHackageDirect. I'm not familiar with how it deals with hackage revisions, though?

@benkolera
Copy link

benkolera commented Sep 8, 2019

@3noch callHackageDirect just gets the tarball from hackage [1], which is as per the original sdist upload and does not contain metadata revisions[2].

[1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/make-package-set.nix#L192
[2] https://github.com/haskell-infra/hackage-trustees/blob/master/revisions-information.md#what-are-revisions

@3noch
Copy link
Collaborator Author

3noch commented Sep 9, 2019

@benkolera Great. I didn't realize the hackage tarball didn't reflect revisions. That makes me more comfortable using callHackageDirect.

@3noch
Copy link
Collaborator Author

3noch commented Sep 9, 2019

@ali-abrar I've moved the dependencies you mentioned to use callHackageDirect instead of being "thunked".

@3noch
Copy link
Collaborator Author

3noch commented Sep 9, 2019

Actually, if we're going to prefer callHackageDirect over thunks... I think a bunch of these dependencies can be switched over. Perhaps we should have a clear stance as to when we prefer one over the other? Currently I see:

callHackageDirect:

  • Uses Hackage
  • Shows version number clearly
  • Avoids extra files in repo

Thunks:

  • Makes it much easier to bump because you don't have to manually update the sha256.
  • (Probably could show version number clearly if we modified obelisk thunks to support tags and not just branches)

@3noch 3noch mentioned this pull request Oct 8, 2019
Copy link
Member

@ali-abrar ali-abrar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the changelog.

@3noch
Copy link
Collaborator Author

3noch commented Oct 17, 2019

@ali-abrar Done.

@ali-abrar ali-abrar merged commit 799db20 into develop Nov 22, 2019
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.

4 participants