haskell / network-uri

URI manipulation facilities
Other
25 stars 33 forks source link

Remark Network.URI.Static as Safe using th-compat-0.1.1 #60

Closed RyanGlScott closed 3 years ago

RyanGlScott commented 3 years ago

I noticed that 4f8c4ffce8e16eff7a09adfbbbacc5bee29b585f uncommented the use of {-# LANGUAGE Safe #-} in Network.URI.Static. I think this is (unintentionally) my fault, as I forgot to mark Language.Haskell.TH.Syntax.Compat as Trustworthy in the initial release of th-compat-0.1, and as a result, Language.Haskell.TH.Syntax.Compat was inferred to be Unsafe due to the fact that it imports from GHC.Exts. I have since released th-compat-0.1.1 which marks that module as Trustworthy, which allows Network.URI.Static to be marked as Safe.

ezrakilty commented 3 years ago

Thanks for looking after that—I had overlooked the loss of SafeHaskell. I'll re-release with this today if I can.

ezrakilty commented 3 years ago

Seems to be working; I'll release this as 2.6.4.1 now.

phadej commented 3 years ago

Do I understand right that network-uri-0.6.4.0 dropped Safe annotation? (And wasn't even Trustworthy)?

I think that is a violation of PVP (spirit) and that release should be blacklisted (with build-depends: base <0) revision. Otherwise there a chances the issue will resurface.

I consider dropping Safe a major breaking change, it does break stuff which rely on it.

ezrakilty commented 3 years ago

Right, 2.6.4.0 lacked the Safe annotation, due to an oversight.

I'm thinking it may not be such a big deal, since the solver is very unlikely to choose 2.6.4.0 while there is a 2.6.4.1?

But I agree with the principle of forcing it not to be used. As far as I know, the best way to handle that is to mark 2.6.4.0 as "deprecated" in Hackage. It sounds like you're suggesting another way, that I'm not familiar with.

I'll wait to take action until I hear from you, @phadej.

phadej commented 3 years ago

Deprecated annotation on Hackage means "you can use it if you need to", where making revision with base <0 will say "never use it".

TL;DR, Deprecations of particular versions are not that useful, but they predate the revision mechanism.