Skip to content

New feature required to work around platform-specific source-repository-package issue #7083

Closed
@newhoggy

Description

@newhoggy

Describe the bug
Sometimes we have the situation where a package we depend only builds on a specific platform. For example libsystemd-journal only builds on Linux. We can if os(linux) in the cabal file, so that much is fine, but let's say the package has a bug in it and we want to fork it and used the fork until the bug is upstreamed. This does not work because source-repository-package adds the project to the list of local packages to always build, so cabal all no longer works, which breaks CI.

To Reproduce
Described above.

Expected behavior
This could be fixed in a number of ways. Add support for if in cabal.project would allow us to conditionally add source-repository-package. Or we could make source-repository-package not add to the list of local projects to build.

System information
Affects all versions of cabal currently.

Additional context
Work arounds include using allow-newer, for example allow-newer: libsystemd-journal:base if the problem is just a version bound adjustment.

But this does not solve the problem if the problem preventing the build from succeeding is not a bounds issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions