user855443
user855443

Reputation: 2950

`cabal install` failed with complaining a non-required file doesn't exist. How to get more detailed information?

I substantially changed a project and removed unused files. Now I cannot install with "Error: [Cabal-4765] xx.hs doesn't exist". The file xx.hs does not exist in the project and is not used in any of the files and I have no memory where it ever existed.

I there a way to get more detailed information why the file is required and where it should be located?

How to proceed with installing? Building works fine, run starts ok.

Upvotes: 0

Views: 23

Answers (1)

user855443
user855443

Reputation: 2950

The request for the xx.hs file was in a test-suite in a package which was loaded. The package produced an test-suite which required the xx.hs file. Once this test-suite fixed (i.e. replace the file with an existing one), the package which imported it, did install.

Given that one imports typically many packages, the error message should include at least the name of the package, in which the file was requested - otherwise the chase may be long.

I also wonder why one of the test-suites in an imported package is blocking the installation; I do not see, how the files in the test-suite would be necessary for the executable of this package.

Upvotes: 0

Related Questions