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

Port to Dhall 1.23 #150

Merged
merged 17 commits into from
May 15, 2019
Merged

Conversation

quasicomputational
Copy link
Collaborator

@quasicomputational quasicomputational commented Apr 28, 2019

No user-facing changes in this PR, though it might be an idea to use the new streamlined enum-like union syntax where we can.

This doesn't actually work yet on two counts:

@quasicomputational
Copy link
Collaborator Author

Status update: 1.22 has been released, but the fix for the above bug didn't make it, so this is still waiting on a release. There's also another thing I think we're being bitten by (dhall-lang/dhall-haskell#926) which we will need a fix for before upgrading.

@ocharles
Copy link
Member

ocharles commented May 2, 2019 via email

@quasicomputational quasicomputational force-pushed the dhall-1.22 branch 3 times, most recently from e07e17e to d324b20 Compare May 5, 2019 17:49
@quasicomputational
Copy link
Collaborator Author

The 'no-user-facing changes' was nice while it lasted. dhall-haskell HEAD now uses the new nullary constructors pervasively, and it's not worth the candle to try and swim upstream - it's something we'll want to do anyway, so it might as well happen now.

In practice, this is going to mean that we'll skip 1.22 entirely and move on to 1.23 next, since the nullary thing is a breaking change and 1.22 is too broken.

@quasicomputational quasicomputational force-pushed the dhall-1.22 branch 2 times, most recently from 31e676c to d7d0695 Compare May 5, 2019 19:16
@quasicomputational quasicomputational changed the title Port to Dhall 1.22 Port to Dhall 1.23 May 12, 2019
@quasicomputational quasicomputational marked this pull request as ready for review May 12, 2019 06:55
@quasicomputational quasicomputational force-pushed the dhall-1.22 branch 2 times, most recently from 984ab4b to 574997b Compare May 12, 2019 07:14
@quasicomputational
Copy link
Collaborator Author

Execution seems a whole lot quicker with the new Dhall version, which is great - still not too quick to be perceptible (like hpack is), but it's no longer so slow that that alone is disqualifying.

With any luck, this PR's ready to go now.

@quasicomputational quasicomputational force-pushed the dhall-1.22 branch 2 times, most recently from e134c71 to b7f2ebb Compare May 12, 2019 07:32
This is less code and (IMO) more idiomatic. More importantly, it will
also work with both normalisation forms for union constructors without
any extra work.
This is a breaking change that's semi-forced because now `genericAuto`
and `UnionType` will use nullary constructors wherever they can.
@quasicomputational quasicomputational force-pushed the dhall-1.22 branch 3 times, most recently from 8341d25 to 4a5b19e Compare May 12, 2019 07:54
@quasicomputational
Copy link
Collaborator Author

No luck, as I might've predicted - Hydra's unhappy with something, but I don't have much to go on except that adding the base-compat-batteries override triggered it.

@ocharles
Copy link
Member

ocharles commented May 12, 2019 via email

Right ( Cabal.UnknownLicense "UnspecifiedLicense" ) ->
license "Unspecified" ( Expr.RecordLit mempty )
licenseNullary "Unspecified"
Right ( Cabal.UnknownLicense l ) ->
license "Unspecified" ( Expr.TextLit (Expr.Chunks [] (StrictText.pack l)) )
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe it should be

Suggested change
license "Unspecified" ( Expr.TextLit (Expr.Chunks [] (StrictText.pack l)) )
license "Unknown" ( Expr.TextLit (Expr.Chunks [] (StrictText.pack l)) )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Plausible. I think it's worth keeping the meaningful changes in this PR to a minimum, though - if this code is confused, it's not as a result of the 1.23-related changes, and it can be dealt with separately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree. Maybe you can't write a cabal config in the actual version to reach that code path (so in that case maybe the union case could be removed from dhall-to-cabal)

ocharles pushed a commit that referenced this pull request May 15, 2019
As discussed in #150 (see comments).

Setting an unknown license with cabal spec < 2.0 threw an error as License.Unspecified doesn't take a Text arg.
@ocharles ocharles merged commit 1eae788 into dhall-lang:master May 15, 2019
@ocharles
Copy link
Member

Ok, I took a slightly alternative approach of just jailbreaking something earlier. Hydra is happy now, so this is merged. Thanks!

@quasicomputational
Copy link
Collaborator Author

Ah, yeah, that's a good idea - I was trying to manually solve the dep tree, but cutting the knot like this is much simpler. Thanks!

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.

3 participants