-
Notifications
You must be signed in to change notification settings - Fork 80
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
How to [new-]build with Cabal 3? #145
Comments
This must be a defect in cabal, right? |
Can you build earlier versions of time in this manner? haskell/cabal#5223 is for time-1.9.1. |
In any case, you should be getting time from Hackage, not from git. |
I checked all versions starting from 1.9 (both from Git tags and from Hackage),
To be honest, I'm not well acquainted with |
If cabal fails with time-1.9.1, isn't this exactly the same as haskell/cabal#5223? |
That’s why I’m confused: haskell/cabal#5223 seems to be closed as resolved with regards to |
diff --git a/time.cabal b/time.cabal
index ceb4b14..c977653 100644
--- a/time.cabal
+++ b/time.cabal
@@ -1,7 +1,8 @@
+cabal-version: 3.0
name: time
version: 1.11.1.1
stability: stable
-license: BSD3
+license: BSD-3-Clause
license-file: LICENSE
author: Ashley Yakeley
maintainer: <[email protected]>
@@ -11,7 +12,6 @@ synopsis: A time library
description: Time, clocks and calendars
category: Time
build-type: Configure
-cabal-version: >=1.10
tested-with:
GHC == 8.0.2,
GHC == 8.2.2,
@@ -76,7 +76,7 @@ library
Data.Time.Format.ISO8601,
Data.Time
other-modules:
- Data.Format
+ Data.Format,
Data.Time.Calendar.Types,
Data.Time.Calendar.Private,
Data.Time.Calendar.Days,
@@ -96,7 +96,7 @@ library
Data.Time.Clock.Internal.UTCDiff,
Data.Time.LocalTime.Internal.TimeZone,
Data.Time.LocalTime.Internal.TimeOfDay,
- Data.Time.LocalTime.Internal.CalendarDiffTime
+ Data.Time.LocalTime.Internal.CalendarDiffTime,
Data.Time.LocalTime.Internal.LocalTime,
Data.Time.LocalTime.Internal.ZonedTime,
Data.Time.Format.Parse,
@@ -110,6 +110,8 @@ library
install-includes:
HsTime.h
else
+ autogen-includes:
+ HsTimeConfig.h
install-includes:
HsTime.h
HsTimeConfig.h (With newer |
It seems like the cabal format has become stricter in recent versions, and the time package no longer complies, is that correct? |
@phadej thanks! Would not |
@Bodigrim yes, just EDIT: Update the above diff. |
@AshleyYakeley Not exactly. Also as part of In fact, without the patch above
|
For the record: I haven't made the patch earlier (e.g. when the Cabal issue was closed), because Hackage didn't support uploading |
It is possible. Even |
OK, I can fix this (or you can make a PR). I'll make a 1.11.1.2 release. |
I don't think release is necessary. It affects only local builds, so you can wait until the release is needed otherwise. I'll make a PR right away |
OK, fix checked in. I'm going to make a 1.11.1.2 version anyway. Thanks everyone. |
|
How so? That seems like a bug in cabal-install logic. Are you using |
Why would it be a bug? |
Ah. Windows. Who uses that for development :) (FWIW, release won't help with rebuilding then. You'll rebuild newer |
Well, I don't mind rebuilding as long as it succeeds. |
There are problems building with older GHC versions. This might take awhile to figure out. |
What you mean by that? |
It means don't expect a release today... |
I don't understand. CI is green, also locally I have
(This is on Linux) |
@AshleyYakeley I suggest that you consider @Bodigrim's offer about CI, https://github.com/haskell/bytestring/runs/1619829279?check_suite_focus=true looks quite nice (and checks Windows too, e.g.). (@Bodigrim https://github.com/haskell/actions/tree/main/setup should AFAIU support all GHCs supported by |
The problem is it's no longer possible to install Previously, this wasn't a problem, because the stock |
Might have to revert the PR. Reopening. |
That's true, and that's certainly a motivation to upgrade
Who runs |
Yes, and then
Most probably nobody :) But |
Sadly that doesn't help, I forgot to run |
OK, I've asked for community feedback here on the possibility of dropping support for old GHC versions. |
I do not quite understand why inability to use Stack with GHC <= 8.6 necessitates dropping support of old GHCs altogether. Is it because Cabal has not been able to build tests before #147? |
If people are using old GHCs with new time, I'd prefer to support stack. In that case, I will revert |
I'll accept your decision as a maintainer on this matter, so just a few data points:
|
This is still a regression in |
All The issue is that In other words, it's impossible for |
I see. I use Generally, I would like to move |
@Bodigrim, why are you building your own time library from the repo? Maybe there's an alternative solution for what you're trying to do? |
I run There are certain workarounds available indeed. E. g., I can recommend |
For as long as It seems to me that version 3 of |
It's true that
I used to think the same, but it appeared that |
Has |
This is not something new with Cabal 3.X series, because |
Not sure I can help you then. At some point I will drop support for GHC 8.6, and at that point I will migrate |
Given recent changes in master, could we possibly get back to this? |
If support for older GHCs is dropped please remember to update lower bounds. |
Done. |
I cannot build
time
withcabal build
, which defaults tonew-build
in recent Cabal:However,
cabal v1-build
still works fine. The issues seems to be similar to haskell/cabal#5223, but that one is closed, so I'm a bit confused.The text was updated successfully, but these errors were encountered: