Skip to content

reconsider removal of System.PosixCompat.User #3

@joeyh

Description

@joeyh

System.PosixCompat.User actally had useful purposes despite not doing anything useful on Windows. Here's how I depend on it in git-annex:

I have a custom Setup.hs, which hooks into cabal to install additional files in the user's home directory.

To get the home directory, I need to use System.Posix.User, so would need a Setup-Depends: unix in the cabal file. But that would prevent building on windows! So instead I Setup-Depends: unix-compat. Then the code that gets the user's home directory is #ifdefed to avoid using getEffectiveUserID on Windows.

Note that cabal does not allow using if(! os(windows)) in the custom-setup block. If it did, I could simply depend on unix conditionally. (Cabal says: invalid subsection "if")

I am going to have to pin unix-compat at an old version, or remove functionality from my custom Setup if this change is not reverted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions