| 29 Aug 2025 |
Thibaut | despite the patches, jailbreaks, I end up with this issue:
> src/Dhall/LSP/Util.hs:16:16: error: [GHC-87543]
> Ambiguous occurrence ‘show’.
> It could refer to
> either ‘Prelude.show’,
> imported from ‘Prelude’ at src/Dhall/LSP/Util.hs:3:8-21
> (and originally defined in ‘ghc-internal-9.1002.0:GHC.Internal.Show’),
> or ‘Data.Text.show’,
> imported from ‘Data.Text’ at src/Dhall/LSP/Util.hs:11:1-16.
> |
> 16 | tshow = pack . show
is it fine if I patch it as tshow = pack . Prelude.show?
| 11:15:33 |
Artem | In reply to @thibaut:fsl.sh
despite the patches, jailbreaks, I end up with this issue:
> src/Dhall/LSP/Util.hs:16:16: error: [GHC-87543]
> Ambiguous occurrence ‘show’.
> It could refer to
> either ‘Prelude.show’,
> imported from ‘Prelude’ at src/Dhall/LSP/Util.hs:3:8-21
> (and originally defined in ‘ghc-internal-9.1002.0:GHC.Internal.Show’),
> or ‘Data.Text.show’,
> imported from ‘Data.Text’ at src/Dhall/LSP/Util.hs:11:1-16.
> |
> 16 | tshow = pack . show
is it fine if I patch it as tshow = pack . Prelude.show?
This is a problem with many packages :-( | 11:22:57 |
sterni (he/him) | The best solution is probably to submit a proper patch for this to upstream, using CPP. You'd want to use Text.show for text >= 2.1.2 and keep the current code for Text < 2.1.2. | 11:32:49 |
sterni (he/him) | Prelude.show would work, I guess, though it is a bit silly to implement tshow yourself if Data.Text exposes it now | 11:33:59 |
Artem | I don't think you need any CPP: with proper qualifications it should be perfectly backwards compatible. | 13:19:25 |
sterni (he/him) | sure | 16:04:05 |
sterni (he/him) | * ~~sure~~ | 16:04:30 |
sterni (he/him) | * sure | 16:04:35 |
| magic_rb changed their profile picture. | 19:30:45 |
Artem | all this text's show fallout is due to the fact that in Haskell you can't require people to import qualified. See, certain modules, including Data.Text, are designed to be imported qualified. They will say so in the documentation. But this is only a guideline. It's impossible to enforce. So, anyone who ignored this guideline, imported Data.Text unqualified, and also happened to use show from Prelude, gets blown out... And the good fix is to import Data.Text qualified and update the usages of stuff from there. An easy fix is to update the usages of show to Prelude.show. None if these two are one-line fix in general, sadly. | 19:38:03 |
maralorn | I mean I kinda think importing without import lists or unqualified should be prevented by a linter on hackage upload. | 19:43:05 |
emily | sometimes you do want that (modules specifically designed as preludes), no? | 19:43:40 |
emily | even in Rust people sometimes do glob imports for that case | 19:43:52 |
maralorn | Yeah, fair. | 19:51:03 |
toonn | Importing Data.Text unqualified would also not be a problem if people actually stuck to the PVP. | 19:52:10 |
maralorn | I mean for us in nixpkgs that wouldn’t really help, we would normally be forced to do a jailbreak anyway and then it wouldn’t compile. Although I agree it is better. | 19:53:57 |
toonn | Well, yeah, but that's going beyond what Hackage and the package maintainers explicitly support. | 20:23:08 |
| 30 Aug 2025 |
sterni (he/him) | toonn: Non-breaking change. Otherwise, if only new bindings, types, classes, non-orphan instances or modules (but see below) were added to the interface, then A.B MAY remain the same but the new C MUST be greater than the old C. | 01:55:58 |
sterni (he/him) | (below is only about leaking instances) | 01:56:09 |
maralorn | sterni: I thought the point is: When you import a package unqualified then you need to have an upper bound on the .C to conform with PVP. | 02:08:57 |
maralorn | * sterni: I thought the point is: When you import a package unqualified then you need to have an upper bound on the .C of that package to conform with PVP. | 02:09:12 |
sterni (he/him) | they don't even use an uppercase MAY or RECOMMENDED for that | 02:12:21 |
sterni (he/him) | they say not doing that is “slightly risky” | 02:12:52 |
sterni (he/him) | but you are technically conforming when everything's fine when uploading | 02:13:03 |
maralorn | Weird. All my years reading CLC discussions had made me think that | 09:10:31 |
toonn | Are you though? Because the PVP as written is for versioning a package, not for how to bound dependencies, no? | 09:24:25 |
Teo (he/him) | Out of interest, how many packages did this break in nixpkgs? I would've expected everything to be updated by now. I guess it's things not on Stackage? | 10:15:42 |
| Uraraka ~ Ochaco changed their profile picture. | 15:30:24 |
| Uraraka ~ Ochaco changed their display name from data Void to Peri. | 15:31:02 |
| @Las:matrix.org left the room. | 22:01:28 |