Ticket #864 (new defect)

Opened 2 years ago

Last modified 14 months ago

worldfile written with incorrect case

Reported by: benmachine Owned by:
Priority: normal Milestone: cabal-install-0.16
Component: cabal-install tool Version: HEAD
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description

If I issue a command like cabal install bindings-dsl, cabal will happily install bindings-DSL and write bindings-dsl to the world file. Then when I cabal install --dry-run world, I get

Warning: The following 'world' packages will be ignored because they refer to
packages that cannot be found: bindings-dsl

This seems to be because of the discrepancies in capitalisation -- the world file is case-sensitive, the install command isn't.

Change History

Changed 16 months ago by kosmikus

  • milestone set to cabal-install-0.14

Changed 14 months ago by kosmikus

  • milestone changed from cabal-install-0.14 to cabal-install-0.16

Pains me to do this, but I'll defer this to the next release. The situation seems a bit messy to me, and I don't want to interfere.

In the install command, user targets are "resolved". During this phase, case-resolution is done, but for example, also "world" is expanded to the actual contents of the world file. The resolved targets are then passed to the solver.

However, when the world file is written, the original command line targets are used, not the resolved ones. And indeed, from the output of the resolver we can't tell anymore which targets have been specified explicitly, and which ones might have been themselves added by other means (such as expanding world).

I think the proper fix is to add enough info to the output of the target resolver so that we can use that info for writing the world file, too. However, this is a change I don't want to make immediately before a release.

Note: See TracTickets for help on using tickets.