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

Binary module interface #4545

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
8bcb154
refact(build): introduce binary and avoid dumping plain text hi files
haitlahcen Jan 26, 2019
7fd5371
add(build): binary deserialization of module interface
haitlahcen Jan 26, 2019
b27698c
refact(build): read binary interface instead of dumped plain text
haitlahcen Jan 26, 2019
50bda19
Merge branch 'binary-module-interface' of https://github.com/haitlahc…
snoyberg Apr 9, 2019
48f39b9
Avoid lazy I/O
snoyberg Apr 9, 2019
4f22736
Don't set redundant setting
snoyberg Apr 9, 2019
60cc29b
Remove FastString
snoyberg Apr 9, 2019
2169b50
Lock the dist directory (fixes #2730)
snoyberg Apr 15, 2019
56ad462
Fix lock files logic description
qrilka Apr 16, 2019
a3da7fb
Merge branch 'master' of https://github.com/commercialhaskell/stack i…
haitlahcen Apr 16, 2019
8683288
announce takes a Utf8Builder
snoyberg Apr 16, 2019
1f14982
withLockedDir that blocks
snoyberg Apr 16, 2019
a21ce56
Implement stack.yaml lock files
qrilka Apr 16, 2019
d33805c
Changelog entry
qrilka Apr 16, 2019
e82067e
Add configure-options settings (fixes #1438)
snoyberg Apr 16, 2019
1dd99da
refactor interface module
haitlahcen Apr 16, 2019
a0fac30
export module to allow tests
haitlahcen Apr 16, 2019
e9ec927
Recommend Stack upgrade when appropriate (fixes #1681)
snoyberg Apr 14, 2019
6e4a05a
Opt-in on requiring the Hackage index be present
snoyberg Apr 14, 2019
e5d9245
Compare minor versions only
snoyberg Apr 16, 2019
b85d072
Delete old UpgradeCheck records
snoyberg Apr 17, 2019
1e11aa0
introduce binary interface tests
haitlahcen Apr 16, 2019
7b7e233
fix architecture detection
haitlahcen Apr 17, 2019
4ea786c
fix: architecture independent deserialization
haitlahcen Apr 17, 2019
bea689e
fix: better tests
haitlahcen Apr 17, 2019
d5ff555
include x32 tests
haitlahcen Apr 17, 2019
b58d66f
Ensure cache occurs even with interrupts
snoyberg Apr 18, 2019
913ec19
Take a lock on the Pantry database for all actions (fixes #4471)
snoyberg Apr 18, 2019
f2857b9
Merge pull request #4756 from commercialhaskell/cache-after-interrupt
snoyberg Apr 18, 2019
fa9b0e3
Merge pull request #4757 from commercialhaskell/4471-lock-all-actions
snoyberg Apr 18, 2019
5a03401
Merge pull request #4750 from commercialhaskell/1438-configure-options
snoyberg Apr 18, 2019
4b061a3
Switch to a LastPerformed table
snoyberg Apr 22, 2019
182daad
Read snapshot locations without content, optimize exact locs
qrilka Apr 22, 2019
79ce99e
Optional snapshot publication timestamp
snoyberg Apr 22, 2019
d2b3930
Merge pull request #4729 from commercialhaskell/1681-check-recent-ver…
snoyberg Apr 22, 2019
a6fe11f
Merge pull request #4761 from commercialhaskell/snapshot-publish-time
snoyberg Apr 22, 2019
b0c9c75
Avoid deadlock in file locking
snoyberg Apr 22, 2019
58d1088
package.yaml: bump stack version to 2.0.0
borsboom Apr 22, 2019
a5c9b1b
Additions necessary for integration of pantry into stackage-server:
lehins Jan 11, 2019
24381d9
Add `Pantry.Internal.Stackage` that exports all of the stuff needed f…
lehins Apr 22, 2019
de9cf4a
Adjust `getHackageTarball` to not rely on callback style and introduc…
lehins Apr 23, 2019
0d920ae
Make rdbms aware queries more type safe with clearer documentation
lehins Apr 23, 2019
4767c4e
Rename binding to packageEntry
lehins Apr 23, 2019
76af901
Merge pull request #4764 from commercialhaskell/mvar-in-file-locking
snoyberg Apr 23, 2019
6e1d9eb
Merge pull request #4765 from commercialhaskell/v2.0.0
snoyberg Apr 23, 2019
a3f71ab
Simplify locks: use them only as completion cache
qrilka Apr 23, 2019
40bf6f0
Merge branch 'master' into lock-files-2
qrilka Apr 23, 2019
bbc3541
Revert back `withStorage_` signature restricted to `RIO`
lehins Apr 23, 2019
89002d3
Minor pantry cleanups
snoyberg Apr 23, 2019
a6f4abf
Switch to RIO from MonadIO for all queries
lehins Apr 23, 2019
aafe48b
Removed redundant constraints
lehins Apr 23, 2019
28912a1
Merge pull request #4766 from commercialhaskell/minor-pantry-cleanups
snoyberg Apr 23, 2019
3aeacec
Switch from missiles to dont to avoid stm test failure
snoyberg Apr 23, 2019
40e905d
Nicer DB locked messages
snoyberg Apr 24, 2019
1e86f2a
Extract github repos into explicit constants
qrilka Apr 24, 2019
d57c1d6
Merge pull request #4773 from commercialhaskell/repos-in-constants
qrilka Apr 24, 2019
0683dc3
Delete old constraints file befor downloading from Github
qrilka Apr 24, 2019
7e16144
Merge pull request #4774 from commercialhaskell/proper-constraints-reuse
qrilka Apr 24, 2019
76139e4
onDoneTalking (thanks to @lehins)
snoyberg Apr 24, 2019
8a57805
Work around for ghc bug: https://gitlab.haskell.org/ghc/ghc/issues/16077
lehins Apr 24, 2019
2cb309f
Merge pull request #4771 from commercialhaskell/nice-lock-message
snoyberg Apr 25, 2019
dfbf85a
Merge pull request #4723 from lehins/changes-for-stackage-server
snoyberg Apr 25, 2019
d5a78e5
Switch to interruptible branch of filelock
snoyberg Apr 28, 2019
aa85308
Merge branch 'master' into lock-files-2
qrilka Apr 29, 2019
90dc3c5
Fix freeze test (publish-date field was added to snapshots)
qrilka Apr 29, 2019
c7d384f
Fix freeze test (publish-date field was added to snapshots)
qrilka Apr 29, 2019
4f28d66
Don't symlink stack.yaml so lock files won't pollute src dir
qrilka Apr 29, 2019
9b5a2d3
Add not only package but also snapshot location cache in lock files
qrilka Apr 29, 2019
f20c467
Update docs to new lock files design
qrilka Apr 29, 2019
47cf7da
Lock files test
qrilka Apr 29, 2019
92512df
No null compiler in output
qrilka Apr 29, 2019
78a113a
Merge pull request #4782 from commercialhaskell/fix-freeze-test
qrilka Apr 29, 2019
b5da6a8
Merge pull request #4784 from commercialhaskell/no-null-compiler
qrilka Apr 29, 2019
26606d0
Remove excess space to extra-deps recommendations
snoyberg Apr 29, 2019
6569075
Merge branch 'master' into lock-files-2
qrilka Apr 29, 2019
8e8fbe4
Merge pull request #4785 from commercialhaskell/remove-excess-space
mattaudesse Apr 29, 2019
c87e073
Merge remote-tracking branch 'origin/master' into 2730-lock-dist-dir
snoyberg Apr 30, 2019
34ad965
Merge pull request #4780 from commercialhaskell/interruptible-file-locks
snoyberg Apr 30, 2019
0448f2a
Share the companion code
snoyberg Apr 30, 2019
42b4ce7
Merge pull request #4739 from commercialhaskell/2730-lock-dist-dir
snoyberg Apr 30, 2019
7dc6001
Remove some unused imports
qrilka Apr 30, 2019
43425d8
Minor doc fix
qrilka Apr 30, 2019
6f853b8
Use patched filelock with CLOEXEC
snoyberg Apr 30, 2019
8b824ef
Merge pull request #4746 from commercialhaskell/lock-files-2
snoyberg Apr 30, 2019
595e9ea
Merge pull request #4787 from commercialhaskell/cloexec-filelock
snoyberg Apr 30, 2019
3f05443
Fix some misplaced parse warnings #4789
snoyberg Apr 30, 2019
38826df
Get package name from completed information #4789
snoyberg May 1, 2019
34ad96f
Remove CPP and TH in Main module
snoyberg May 1, 2019
a22adee
Support symlinks to directories (fixes #4776)
snoyberg May 1, 2019
bd647ff
Make subdir field optional #4793
snoyberg May 1, 2019
ba6037a
Merge pull request #4790 from commercialhaskell/4789-improved-from-js…
snoyberg May 1, 2019
babe25b
Merge pull request #4792 from commercialhaskell/remove-th-cpp-in-main
snoyberg May 1, 2019
91fc080
Merge pull request #4793 from commercialhaskell/4776-symlinks-to-dirs
snoyberg May 1, 2019
28138a9
Merge pull request #4791 from commercialhaskell/4789-package-name-fro…
snoyberg May 2, 2019
e782c7b
Merge branch 'binary-module-interface' of https://github.com/haitlahc…
snoyberg May 3, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ tags
/etc/scripts/stack-scripts.cabal
.hspec-failures
better-cache/
/subs/*/*.cabal
15 changes: 15 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ Major changes:
is uniquely identified by a commit id and an Hadrian "flavour" (Hadrian is
the newer GHC build system), hence `compiler` can be set to use a GHC
built from source with `ghc-git-COMMIT-FLAVOUR`
* `stack.yaml` now supports a `configure-options`, which are passed directly to
the `configure` step in the Cabal build process. See
[#1438](https://github.com/commercialhaskell/stack/issues/1438)

* Remove support for building GHCJS itself. Future releases of Stack
may remove GHCJS support entirely.
* Support for lock files for pinning exact project dependency versions

Behavior changes:
* `stack.yaml` now supports `snapshot`: a synonym for `resolver`. See [#4256](https://github.com/commercialhaskell/stack/issues/4256)
Expand Down Expand Up @@ -116,6 +120,17 @@ Behavior changes:
means that Stack will no longer have to force reconfigures as often. See
[#3554](https://github.com/commercialhaskell/stack/issues/3554).

* When building a package, Stack takes a lock on the dist directory in
use to avoid multiple runs of Stack from trampling each others'
files. See
[#2730](https://github.com/commercialhaskell/stack/issues/2730).

* Stack will check occassionally if there is a new version available and prompt
the user to upgrade. This will not incur any additional network traffic, as
it will piggy-back on the existing Hackage index updates. You can set
`recommend-stack-upgrade: false` to bypass this. See
[#1681](https://github.com/commercialhaskell/stack/issues/1681).

Other enhancements:

* Defer loading up of files for local packages. This allows us to get
Expand Down
100 changes: 22 additions & 78 deletions doc/lock_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ set of input files. There are a few problems with making this work:

To address this, we follow the (fairly standard) approach of having a
_lock file_. The goal of the lock file is to cache completed
information about all packages and snapshot files so that:
locations of project, snapshot packages and snapshots themselves so that:

* These files can be stored in source control
* Users on other machines can reuse these lock files and get identical
build plans
build plans given that the used local packages and local snapshots are
the same on those machines
* Rerunning `stack build` in the future is deterministic in the build
plan, not depending on mutable state in the world like Hackage
revisions
Expand All @@ -31,8 +32,6 @@ information about all packages and snapshot files so that:
to perform the build. However, by deterministic, we mean it
either performs the same build or fails, never accidentally
doing something different.
* Stack can quickly determine the build plan in the common case of no
changes to `stack.yaml` or snapshot files

This document explains the contents of a lock file, how they are used,
and how they are created and updated.
Expand All @@ -42,11 +41,7 @@ and how they are created and updated.
Relevant to this discussion, the `stack.yaml` file specifies:

* Resolver (the parent snapshot)
* Compiler override
* `extra-deps`
* Flags
* GHC options
* Hidden packages

The resolver can either specify a compiler version or another snapshot
file. This snapshot file can contain the same information referenced
Expand All @@ -55,12 +50,7 @@ above for a `stack.yaml`, with the following differences:
* The `extra-deps` are called `packages`
* Drop packages can be included

Some of this information is, by its nature, complete. For example, the
"flags" field cannot be influenced by anything outside of the file
itself.

On the other hand, some information in these files can be
incomplete. Consider:
Some information in these files can be incomplete. Consider:

```yaml
resolver: lts-13.9
Expand Down Expand Up @@ -128,24 +118,16 @@ parsing of the additional files in the common case of no changes.

The lock file contains the following information:

* The full snapshot definition information, including completed
package locations for both `extra-deps` and packages in
* Completed package locations for both `extra-deps` and packages in
snapshot files
* **NOTE** This only applies to _immutable_ packages. Mutable
packages are not included in the lock file.
* Completed information for the snapshot locations
* A hash of the `stack.yaml` file
* The snapshot hash, to bypass the need to recalculate this on each
run of Stack

It looks like the following:

```yaml
# Lock file, some message about the file being auto-generated
stack-yaml:
sha256: XXXX
size: XXXX # in bytes

snapshots:
# Starts with the snapshot specified in stack.yaml,
# then continues with the snapshot specified in each
Expand All @@ -163,33 +145,22 @@ snapshots:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/9.yaml
sha256: 83de9017d911cf7795f19353dba4d04bd24cd40622b7567ff61fc3f7223aa3ea

compiler: ghc-X.Y.Z

packages:
acme-missiles:
location:
# QUESTION: any reason we need to specify which snapshot file it came from? I don't think so...
original: https://hackage.haskell.org/package/acme-missiles-0.3.tar.gz
completed:
size: 1442
url: https://hackage.haskell.org/package/acme-missiles-0.3.tar.gz
cabal-file:
size: 613
sha256: 2ba66a092a32593880a87fb00f3213762d7bca65a687d45965778deb8694c5d1
name: acme-missiles
version: '0.3'
sha256: e563d8b524017a06b32768c4db8eff1f822f3fb22a90320b7e414402647b735b
pantry-tree:
size: 226
sha256: 614bc0cca76937507ea0a5ccc17a504c997ce458d7f2f9e43b15a10c8eaeb033
flags: ...
hidden: true/false
ghc-options: [...]
- original: https://hackage.haskell.org/package/acme-missiles-0.3.tar.gz
completed:
size: 1442
url: https://hackage.haskell.org/package/acme-missiles-0.3.tar.gz
cabal-file:
size: 613
sha256: 2ba66a092a32593880a87fb00f3213762d7bca65a687d45965778deb8694c5d1
name: acme-missiles
version: '0.3'
sha256: e563d8b524017a06b32768c4db8eff1f822f3fb22a90320b7e414402647b735b
pantry-tree:
size: 226
sha256: 614bc0cca76937507ea0a5ccc17a504c997ce458d7f2f9e43b15a10c8eaeb033
```

**NOTE** The `original` fields may seem superfluous at first. See the
update procedure below for an explanation.

## Creation

Whenever a `stack.yaml` file is loaded, Stack checks for a lock file
Expand All @@ -206,36 +177,9 @@ If the lock file does not exist, it will be created by:
* Completing all missing information
* Writing out the new `stack.yaml.lock` file

## Dirtiness checking

If the `stack.yaml.lock` file exists, its last modification time is
compared against the last modification time of the `stack.yaml` file
and any local snapshot files. If any of those files is more recent
than the `stack.yaml` file, and the file hashes in the lock file
do not match the files on the filesystem, then the update procedure is
triggered. Otherwise, the `stack.yaml.lock` file can be used as the
definition of the snapshot.

## Update procedure

The simplest possible implementation is: ignore the lock file entirely
and create a new one followign the creation steps above. There's a
significant downside to this, however: it may cause a larger delta in
the lock file than intended, by causing more packages to be
updates. For example, many packages from Hackage may have their
Hackage revision information updated unnecessarily.

The more complicated update procedure is described below. **QUESTION**
Do we want to go the easy way at first and later implement the more
complicated update procedure?

1. Create a map from original package location to completed package
location in the lock file
2. Load up each snapshot file
3. For each incomplete package location:
* Lookup the value in the map created in (1)
* If present: use that completed information
* Otherwise: complete the information using the same completion
procedure from Pantry as in "creation"

This should minimize the number of changes to packages incurred.
When loading a Stack project all completed package or snapshot locations
(even when they were completed using information from a lock file) get
collected to form a new lock file in memory and compare against the one
on disk, writing if there are any differences.
26 changes: 26 additions & 0 deletions doc/yaml_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,24 @@ on an options change, but this behavior can be changed back with the following:
rebuild-ghc-options: true
```

### configure-options

Options which are passed to the configure step of the Cabal build process.
These can either be set by package name, or using the `$everything`,
`$targets`, and `$locals` special keys. These special keys have the same
meaning as in `ghc-options`.

```yaml
configure-options:
$everything:
- --with-gcc
- /some/path
my-package:
- --another-flag
```

(Since 2.0)

### ghc-variant

(Since 0.1.5)
Expand Down Expand Up @@ -1072,4 +1090,12 @@ Build output when disabled:
...
```

### recommend-stack-upgrade

When Stack notices that a new version of Stack is available, should it notify the user?

```yaml
recommend-stack-upgrade: true
```

Since 2.0
6 changes: 5 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: stack
version: '1.10.0'
version: '2.0.0'
synopsis: The Haskell Tool Stack
description: ! 'Please see the README.md for usage information, and
the wiki on Github for more details. Also, note that
Expand Down Expand Up @@ -123,6 +123,7 @@ dependencies:
- yaml
- zip-archive
- zlib
- binary
when:
- condition: os(windows)
then:
Expand Down Expand Up @@ -183,6 +184,8 @@ library:
- Stack.IDE
- Stack.Init
- Stack.Ls
- Stack.Lock
- Stack.ModuleInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a ChangeLog entry explaining the change here.

- Stack.New
- Stack.Nix
- Stack.Options.BenchParser
Expand Down Expand Up @@ -302,6 +305,7 @@ tests:
dependencies:
- QuickCheck
- hspec
- raw-strings-qq
- stack
- smallcheck
flags:
Expand Down
2 changes: 2 additions & 0 deletions snapshot-lts-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ packages:
- yaml-0.10.4.0@rev:0 #for hpack-0.31
- persistent-2.9.2@rev:0
- persistent-sqlite-2.9.3@rev:0
- github: snoyberg/filelock
commit: 97e83ecc133cd60a99df8e1fa5a3c2739ad007dc

drop-packages:
# See https://github.com/commercialhaskell/stack/pull/4712
Expand Down
2 changes: 2 additions & 0 deletions snapshot-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: snapshot-for-building-stack-with-ghc-8.6.2
packages:
- persistent-2.9.2@rev:0
- persistent-sqlite-2.9.3@rev:0
- github: snoyberg/filelock
commit: 97e83ecc133cd60a99df8e1fa5a3c2739ad007dc

drop-packages:
# See https://github.com/commercialhaskell/stack/pull/4712
Expand Down
2 changes: 2 additions & 0 deletions snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ packages:
- process-1.6.3.0@sha256:fc77cfe75a9653b8c54ae455ead8c06cb8adc4d7a340984d84d8ca880b579919,2370 #because of https://github.com/haskell/process/pull/101
- persistent-2.9.2@rev:0
- persistent-sqlite-2.9.3@rev:0
- github: snoyberg/filelock
commit: 97e83ecc133cd60a99df8e1fa5a3c2739ad007dc

drop-packages:
# See https://github.com/commercialhaskell/stack/pull/4712
Expand Down
6 changes: 4 additions & 2 deletions src/Stack/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,18 @@ loadPackage
:: (HasBuildConfig env, HasSourceMap env)
=> PackageLocationImmutable
-> Map FlagName Bool
-> [Text]
-> [Text] -- ^ GHC options
-> [Text] -- ^ Cabal configure options
-> RIO env Package
loadPackage loc flags ghcOptions = do
loadPackage loc flags ghcOptions cabalConfigOpts = do
compiler <- view actualCompilerVersionL
platform <- view platformL
let pkgConfig = PackageConfig
{ packageConfigEnableTests = False
, packageConfigEnableBenchmarks = False
, packageConfigFlags = flags
, packageConfigGhcOptions = ghcOptions
, packageConfigCabalConfigOpts = cabalConfigOpts
, packageConfigCompilerVersion = compiler
, packageConfigPlatform = platform
}
Expand Down
18 changes: 9 additions & 9 deletions src/Stack/Build/ConstructPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type M = RWST -- TODO replace with more efficient WS stack on top of StackT

data Ctx = Ctx
{ baseConfigOpts :: !BaseConfigOpts
, loadPackage :: !(PackageLocationImmutable -> Map FlagName Bool -> [Text] -> M Package)
, loadPackage :: !(PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> M Package)
, combinedMap :: !CombinedMap
, ctxEnvConfig :: !EnvConfig
, callStack :: ![PackageName]
Expand Down Expand Up @@ -171,7 +171,7 @@ instance HasEnvConfig Ctx where
constructPlan :: forall env. HasEnvConfig env
=> BaseConfigOpts
-> [DumpPackage] -- ^ locally registered
-> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> RIO EnvConfig Package) -- ^ load upstream package
-> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) -- ^ load upstream package
-> SourceMap
-> InstalledMap
-> Bool
Expand Down Expand Up @@ -231,8 +231,8 @@ constructPlan baseConfigOpts0 localDumpPkgs loadPackage0 sourceMap installedMap

mkCtx econfig globalCabalVersion sources mcur pathEnvVar' = Ctx
{ baseConfigOpts = baseConfigOpts0
, loadPackage = \x y z -> runRIO econfig $
applyForceCustomBuild globalCabalVersion <$> loadPackage0 x y z
, loadPackage = \w x y z -> runRIO econfig $
applyForceCustomBuild globalCabalVersion <$> loadPackage0 w x y z
, combinedMap = combineMap sources installedMap
, ctxEnvConfig = econfig
, callStack = []
Expand Down Expand Up @@ -426,7 +426,7 @@ addDep name = do
-- names. This code does not feel right.
let version = installedVersion installed
askPkgLoc = liftRIO $ do
mrev <- getLatestHackageRevision name version
mrev <- getLatestHackageRevision YesRequireHackageIndex name version
case mrev of
Nothing -> do
-- this could happen for GHC boot libraries missing from Hackage
Expand Down Expand Up @@ -469,7 +469,7 @@ tellExecutablesUpstream name retrievePkgLoc loc flags = do
when (name `Set.member` wanted ctx) $ do
mPkgLoc <- retrievePkgLoc
forM_ mPkgLoc $ \pkgLoc -> do
p <- loadPackage ctx pkgLoc flags []
p <- loadPackage ctx pkgLoc flags [] []
tellExecutablesPackage loc p

tellExecutablesPackage :: InstallLocation -> Package -> M ()
Expand Down Expand Up @@ -505,7 +505,7 @@ installPackage name ps minstalled = do
case ps of
PSRemote pkgLoc _version _fromSnaphot cp -> do
planDebug $ "installPackage: Doing all-in-one build for upstream package " ++ show name
package <- loadPackage ctx pkgLoc (cpFlags cp) (cpGhcOptions cp)
package <- loadPackage ctx pkgLoc (cpFlags cp) (cpGhcOptions cp) (cpCabalConfigOpts cp)
resolveDepsAndInstall True (cpHaddocks cp) ps package minstalled
PSFilePath lp -> do
case lpTestBench lp of
Expand Down Expand Up @@ -662,7 +662,7 @@ addPackageDeps package = do
eres <- addDep depname
let getLatestApplicableVersionAndRev :: M (Maybe (Version, BlobKey))
getLatestApplicableVersionAndRev = do
vsAndRevs <- runRIO ctx $ getHackagePackageVersions UsePreferredVersions depname
vsAndRevs <- runRIO ctx $ getHackagePackageVersions YesRequireHackageIndex UsePreferredVersions depname
pure $ do
lappVer <- latestApplicableVersion range $ Map.keysSet vsAndRevs
revs <- Map.lookup lappVer vsAndRevs
Expand Down Expand Up @@ -1057,7 +1057,7 @@ pprintExceptions exceptions stackYaml stackRoot parentMap wanted' prunedGlobalDe
pprintExtra (name, (version, BlobKey cabalHash cabalSize)) =
let cfInfo = CFIHash cabalHash (Just cabalSize)
packageIdRev = PackageIdentifierRevision name version cfInfo
in "- " <+> fromString (T.unpack (utf8BuilderToText (RIO.display packageIdRev)))
in fromString ("- " ++ T.unpack (utf8BuilderToText (RIO.display packageIdRev)))

allNotInBuildPlan = Set.fromList $ concatMap toNotInBuildPlan exceptions'
toNotInBuildPlan (DependencyPlanFailures _ pDeps) =
Expand Down
Loading