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

Add compatibility for Cabal 3.6.* inclusive #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ivb-supercede
Copy link

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.)

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
    `SymbolicPath`s instead of `FilePath`s.

(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.)
@avnik
Copy link

avnik commented Dec 14, 2022

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.

@chshersh
Copy link
Contributor

Hi @avnik,

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

@avnik
Copy link

avnik commented Dec 16, 2022

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

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

@ivb-supercede
Copy link
Author

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.

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