mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 17:32:00 +03:00
511e99f217
## Global package configuration This PR updates the global-project to use `Package.juvix` instead of `juvix.yaml`. The global package gets the following `Package.juvix`: ``` module Package; import PackageDescription.V1 open; package : Package := defaultPackage {name := "global-juvix-package"; version := mkVersion 0 0 0; dependencies := [defaultStdlib]}; ``` ## juvix clean --global This PR also adds an option `-g/--global` to `juvix clean` that removes the `$XDG_CONFIG_HOME/juvix/VERSION` directory. ## Testing notes If you've already run Juvix 0.5.3 you'll need to run `juvix clean -g` before you'll use the new global project. This will not be an issue for users of Juvix 0.5.4 (as this version of Juvix will never generate juvix.yaml in the global project). Part of: * https://github.com/anoma/juvix/issues/2487
21 lines
458 B
Haskell
21 lines
458 B
Haskell
module Commands.Clean.Options where
|
|
|
|
import CommonOptions
|
|
import Juvix.Extra.Version
|
|
|
|
newtype CleanOptions = CleanOptions
|
|
{_cleanOptionsGlobal :: Bool}
|
|
deriving stock (Data)
|
|
|
|
makeLenses ''CleanOptions
|
|
|
|
parseCleanOptions :: Parser CleanOptions
|
|
parseCleanOptions = do
|
|
_cleanOptionsGlobal <-
|
|
switch
|
|
( long "global"
|
|
<> short 'g'
|
|
<> help ("Remove $XDG_CONFIG_HOME/juvix/" <> unpack versionDoc)
|
|
)
|
|
pure CleanOptions {..}
|