-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--cabal-file needs to go #8395
Comments
Yes, option Alternatively, it could be fixed to mean these two things (conjunction):
|
I played a bit with removing the option. It seems to be used in the testsuite. So most work in removing this option would go into restructuring the test that currently use it. |
Those look like Setup.hs tests though, so removing the option from |
I had a go myself here. I am a bit confused (not new 😂). The option Do we want to remove it from Cabal or only from cabal-install? AFAIU we do have a mechanism to hide some Cabal flags when we use them from cabal-install. But that's also a bit messed up because it's duplicated in a few places and doesn't really inspire confidence. Also Cabal's cabalFilePath gets passed to what I understand is the Hooks API (haddockCabalFilePath, hscolourCabalFilePath, copyCabalFilePath, installCabalFilePath, regCabalFilePath, cleanCabalFilePath, ...) and there's some warning in the code about breaking that API. |
From cabal-install. Yes I think we can just hide it |
The ticket got closed via the excellent PR by @andreabedini. Is there anything left here to do? If so, maybe let's move it to other tickets with clear scopes? |
As discussed in #6880,
--cabal-file
has never been used for what people think it's meant. The best way forward, seemingly, is to remove the option (edit by @fgaz: from cabal-install). This follows up on not only #6880 but also #7225.Alternatives
Different people want different things from
--cabal-file
, e.g.:cabal
out of the package directory (Unnecessarily difficult to run executables from outside of project #7940).cabal
inside of the package directory but with a cabal file located outside of the directory (cabal file not found despite --cabal-file #6880, --cabal-file appears not to work #7225).The second scenario is not supported currently. The first one can be worked around with another option:
--project-file
. In particular, you can create a project file along with the package of interest (if there's none currently), and point to it callingcabal
from anywhere. In that case the respective package will be built/ran/installed. Beware of a current bug not allowing to use relative paths with--project-file
: use absolute path until #7749 (or analogous fix) is merged.The text was updated successfully, but these errors were encountered: