Skip to content
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

Support lockfiles, take 2 #1138

Merged
merged 9 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bin/spago.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package:
publish:
version: 0.93.19
license: BSD-3-Clause
build:
censor_project_warnings:
- WildcardInferredType
dependencies:
- aff
- optparse
- arrays
- codec-argonaut
- console
Expand All @@ -14,6 +16,7 @@ package:
- node-fs
- node-path
- node-process
- optparse
- ordered-collections
- record
- refs
Expand Down
7 changes: 7 additions & 0 deletions bin/src/Flags.purs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ transitive =
<> O.help "Include transitive dependencies"
)

pure :: Parser Boolean
pure =
O.switch
( O.long "pure"
<> O.help "Use the package information from the current lockfile, even if it is out of date"
)

pedanticPackages :: Parser Boolean
pedanticPackages =
O.switch
Expand Down
171 changes: 61 additions & 110 deletions bin/src/Main.purs

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions core/src/Config.purs
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,10 @@ type WorkspaceConfig =
, extra_packages :: Maybe (Map PackageName ExtraPackage)
, backend :: Maybe BackendConfig
, build_opts :: Maybe WorkspaceBuildOptionsInput
, lock :: Maybe Boolean
}

workspaceConfigCodec :: JsonCodec WorkspaceConfig
workspaceConfigCodec = CA.object "WorkspaceConfig"
$ CA.recordPropOptional (Proxy :: _ "lock") CA.boolean
$ CA.recordPropOptional (Proxy :: _ "package_set") setAddressCodec
$ CA.recordPropOptional (Proxy :: _ "backend") backendConfigCodec
$ CA.recordPropOptional (Proxy :: _ "build_opts") buildOptionsCodec
Expand Down
5 changes: 3 additions & 2 deletions core/src/Prelude.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Prelude

import Control.Alt ((<|>)) as Extra
import Control.Monad.Error.Class (class MonadError, class MonadThrow, try, catchError) as Extra
import Control.Monad.Reader (ask, asks) as Extra
import Control.Monad.Reader (class MonadAsk, ReaderT, runReaderT)
import Control.Monad.Reader (ask, asks, local) as Extra
import Control.Monad.Reader (class MonadAsk, class MonadReader, ReaderT, runReaderT)
import Control.Monad.State (StateT) as Extra
import Data.Array ((..)) as Extra
import Data.Array.NonEmpty (NonEmptyArray) as Extra
Expand Down Expand Up @@ -65,6 +65,7 @@ derive newtype instance Extra.MonadAff (Spago env)
derive newtype instance Extra.MonadThrow Extra.Error (Spago env)
derive newtype instance Extra.MonadError Extra.Error (Spago env)
derive newtype instance MonadAsk env (Spago env)
derive newtype instance MonadReader env (Spago env)

runSpago' :: forall a env. env -> Spago env a -> Extra.Aff a
runSpago' env (Spago m) = runReaderT m env
Expand Down
35 changes: 26 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading