You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the --store-dir=DIR option on, it works well on Windows.
For example,
cabal --store-dir "./store-dir" build
It will build all the packages in the current project directory.
## My project folder now generate a new subfolder `store-dir`
\---store-dir
\---ghc-9.8.1
+---incoming
+---package.db
+---linear-1.22-bd032fa56680dc724a9bbbfee960b52b4c4a70c6
+---OpenGL-3.0.3.0-2ae721ae6ad7822f734a3392b576ce1d14f6aabd
+---kan-extensions-5.2.5-4b3c60b0ae89aab3067951ef9c1cac496a515b
+...
However, --store-dir=DIR can only be set via command line at the moment.
The 1st question is that is it possible to set --store-dir=DIR in cabal.project in the future version?
The 2nd question is that, in this context, what role does the option package-dbs: play?
P.s. In the above command, i.e. cabal --store-dir "./store-dir" build, I did not set package-dbs in cabal.project at all, but it works. Why we have both --store-dir and --package-db (or package-dbs:) at the same time?
See #9678 for a discussion about the semantics of --package-db flag. In short, you probably don't want to use it for this use case.
You could set store-dir in a cabal.config file instead of a cabal.project file but that is supposed to be for system-wide configuration. I don't think you are really supposed to set --store-dir per project which is why you can't set it in a cabal.project file.
@chansey97 If you/a distro want to augment the global package database with some more packages which are always available then you can build the package database yourself (probably not with cabal-install) and then make it available for cabal-install to use.
In the cabal testsuite we do this in order to provide up-to-date Cabal library versions for cabal-install to use.
What is your question?
Even though the sandbox functionality has been removed, I still wish a way to simulate its functionality.
I tried the --store-dir=DIR option on, it works well on Windows.
For example,
cabal --store-dir "./store-dir" build
It will build all the packages in the current project directory.
However,
--store-dir=DIR
can only be set via command line at the moment.The 1st question is that is it possible to set
--store-dir=DIR
in cabal.project in the future version?The 2nd question is that, in this context, what role does the option package-dbs: play?
P.s. In the above command, i.e.
cabal --store-dir "./store-dir" build
, I did not setpackage-dbs
in cabal.project at all, but it works. Why we have both--store-dir
and--package-db
(orpackage-dbs:
) at the same time?If I config
cabal.project
as the followsand type
cabal build
on command line.It complains
I also tried
and on command line
cabal --store-dir "./input" build
.It doesn't work as well.
System information
The text was updated successfully, but these errors were encountered: