autopack icon indicating copy to clipboard operation
autopack copied to clipboard

Add compatibility for Cabal 3.6.* inclusive

Open ivb-supercede opened this issue 3 years ago • 4 comments

This makes two changes:

  • For compatibility with 3.4+ without warnings, fromComponents has been replaced with a call to fromString and intercalate.
  • For compatibility with 3.6+, Autopack.hs now uses the C preprocessor with Cabal's version flags to handle a breaking change in the Cabal API around hsSourceDirs, which are now SymbolicPaths instead of FilePaths.

(I know getSymbolicPath says "Don't use this in new code", but I can't find any alternative - in the Cabal codebase, it is used in new code.)

ivb-supercede avatar Apr 04 '22 13:04 ivb-supercede

Gently poke about this (@chshersh, @vrom911). I have own suggestion to just make shim for old cabal versions:

#if !MIN_VERSION_Cabal(3,6,0)
-- shim for Cabal =< 3.6
getSymbolicPath :: FilePath -> FilePath
getSymbolicPath = id
#endif

then use getSymbolicPath unconditionally.

avnik avatar Dec 14 '22 21:12 avnik

Hi @avnik,

I'm not maintaining Kowainik projects anymore so you don't need to ping me 🙂

chshersh avatar Dec 15 '22 09:12 chshersh

@chshersh So this project actually abandoned (same for co-log/relude?)

@ivb-supercede could one of us overtake it upstream?

avnik avatar Dec 16 '22 14:12 avnik

It looks to me like colog and relude are still being maintained.

We can take over maintenance of autopack in order to publish this fix, if it's necessary.

ivb-supercede avatar Dec 16 '22 14:12 ivb-supercede