old-style | new-style |
---|---|
install --only-dependencies |
part of new-build |
install path-to-local-dir |
add a ./cabal.project file, add your local dependency, then use new-build (cabal.project syntax is described in the announcement) |
install path-to-local-sdist |
does not exist yet |
install remote-package-uri |
does not exist yet |
install [--bindir=.. ] |
does not exist (yet) |
configure |
new-configure |
build |
(part of) new-build |
clean |
does not exist yet; you have to remove ./dist-newstyle/ and ./cabal.project.local by hand, and potentially ./dist/ as well, i may have observed that it got touched by new-build (not sure, really). This needs to be done for each package referenced from the cabal.project as well. |
run |
does not exist yet; you can new-build and ./dist-newstyle/build/PACKAGE-VERSION/build/EXECUTABLE/EXECUTABLE |
repl |
new-repl |
test |
does not exist yet; you can new-build --enable-tests and ./dist-newstyle/build/PACKAGE-VERSION/build/TEST/TEST |
bench |
does not exist yet; see above. |
haddock |
does not exist yet |
freeze |
does not exist yet |
- (over)write
./cabal.project.local
according to FLAGS
-
builds one or more components, including setting up/building local and non-local dependencies.
-
project setup is read from
./cabal.project
. If only afoo.cabal
package description is present, applies an implicit one-package setup. -
configuration flags are read, in ascending priority, from
$HOME/.cabal/config
./cabal.project
./cabal.project.local
(seenew-configure
)- FLAGS from the commandline (these will not be persisted in any way)
note that
./cabal.config
is not considered.
-
each
TARGET
has the formPACKAGEPATH | PACKAGEFILEPATH | [PACKAGE][:][[COMPONENTTYPE:]COMPONENT]
wherePACKAGEPATH
is the path of a directory containing a.cabal
filePACKAGEFILEPATH
is the path of a.cabal
fileCOMPONENTTYPE
is "lib", "exe", "test" or "bench".
-
if no
TARGET
s are specified, acts like there is oneTARGET
"./", i.e. build the package in the current directory. Note that nothing will be built if there is no package in "./". -
PACKAGE
must be a packagename from the set of visible packages. Visible packages are: If present, those specified incabal.project
; Otherwise, all packages located at any*/*.cabal
, i.e. packages in the current directory or its direct children. -
effects:
- install remote dependencies into the user-local "store" (
$HOME/.cabal/store/
) (as time of writing, uri dependencies are not supported; not sure where those would be put. just to clarify "remote".) - build COMPONENTS and their local dependencies; by default all buildable cabal package components for all packages in the project setup, respecting configuration like --enable/disable-tests [TODO: clarify default]
- local dependencies are registered locally only.
- for all local dependencies, (re)building is omitted if no changes (to configuration, local package contents and used (remote) dependency (versions)) are detected.
- install remote dependencies into the user-local "store" (