haskell / haskell/cabal

--allow-newer doesn't work for build-tools

Open
#4,431 5 comments 0 reactions 0 assignees View on GitHub
cabal-install: solver re: allow-newer re: build-tool type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

The `--allow-newer` flag doesn't appear to work with `build-tools`. Given this simple `.cabal file`:

```
name: foo
version: 0.1.0.0
build-type: Simple
cabal-version: >=1.10

library
build-depends: base
build-tools: alex < 3.2
default-language: Haskell2010
```

Trying to configure it fails when I have `alex-3.2.1` installed, even with `--allow-newer`:

```
$ cabal configure --allow-newer
Resolving dependencies...
Configuring foo-0.1.0.0...
cabal: The program 'alex' version <3.2 is required but the version found at
/u/rgscott/.cabal/bin/alex is version 3.2.1
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the provided .cabal file and `cabal configure --allow-newer`, focusing on the `build-tools` constraint and the installed alex version. Done means configuration accepts alex-3.2.1 when `--allow-newer` is supplied, while still enforcing the constraint without that flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.