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

List global package deps in stack dot graph #4500

Merged
merged 108 commits into from
Mar 15, 2019

Conversation

vanceism7
Copy link
Contributor

Changed the code for the dependency loader to read dependencies for global packages from the global dump.

Tested the changes by doing the basic setup described in the issue (#4324)
i.e: ran the command stack exec stack dot -- --external | grep '"process"'

src/Stack/Dot.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@qrilka qrilka left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Contributor

@qrilka qrilka left a comment

Choose a reason for hiding this comment

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

Just minor comments otherwise looks OK

src/Stack/Dot.hs Outdated Show resolved Hide resolved
src/Stack/Dot.hs Outdated Show resolved Hide resolved
@mihaimaruseac mihaimaruseac changed the title Fixes #4324 - global package deps not listed in stack dot graph List global package deps in stack dot graph Jan 22, 2019
src/Stack/Dot.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@qrilka qrilka left a comment

Choose a reason for hiding this comment

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

Thank you, I have already used this when looking into #4510

@vanceism7
Copy link
Contributor Author

Hey np, I'm glad I could help out

dbaynard and others added 27 commits March 4, 2019 17:02
…odules

Add support for Git repositories with submodules
…tor-stackage-build-with-stack

Curator stackage build with stack
…-file-docs

Add documentation for lock files
Confirmed that this test passes with Stack 1.9.3 and fails with master.
Since we no longer require this field, the previous code would spit out
a warning if it was present. This is extremely noisy for a field that
used to be required. Instead: just ignore the field if present.
When running `stack clean`, the entire .stack-work/dist directory will
now be deleted, not just the subdirectory for the current GHC/Cabal
combination.
With the changes in previous commits, purge will in fact now work with
Docker.
…ame-warning

Avoid a warning for names in snapshots
…iler-override-does-not-work

Fix for not working compiler override in stack.yaml
…-fix-stack-clean

stack clean does not need ghc-pkg (fixes commercialhaskell#4480)
This PR fixes this failure:

``` shellsession
Running test script-extra-dep
Running: /home/sibi/.local/bin/stack script.hs

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for acme-missiles-0.3:
    stm needed, but the stack configuration has no specified version  (latest matching version is 2.5.0.0)
needed since acme-missiles is a build target.

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many
    complicated constraint errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /home/sibi/.stack/script/048d6ed9f71bbafeb2cf702cda487d65dbd1010070852364425533166dcd99bc/config.yaml:

stm-2.5.0.0@sha256:1fb8bd117550d560d1b33a6404e27fdb090e70921e0f6434722cdbbce20d8256,2086

Plan construction failed.
Main.hs: Exited with exit code: ExitFailure 1
CallStack (from HasCallStack):
  error, called at ../../../lib/StackTest.hs:52:34 in main:StackTest
  stack, called at ../Main.hs:4:8 in main:Main
```

`stm` package is one of the dependency of acme-missiles, so that also
needs to be added as part of `extra-dep` for the test to run properly
`stm` package is one of the dependency of `acme-missiles`, so that
also needs to be added as part of `packages` section of the
`snapshot.yaml` file.
…ure-extra-deps

Fix test failure for script-extra-dep
…ipt-snapshots

Fix test failure for relative-script-snapshots
Without this, this results in an build error like this:

``` shellsession
$ ./run-single-test.sh mutable-deps
Running test mutable-deps
Running: /home/sibi/.local/bin/stack build
directory-1.3.0.2: unregistering (missing dependencies: filepath)
filemanip-0.3.6.3: unregistering (missing dependencies: directory, filepath)
filepath-1.4.1.2: unregistering (local file changes: System/FilePath/Internal.hs)
files-1.0.0: unregistering (missing dependencies: filemanip)
filepath-1.4.1.2: configure (lib)
filepath-1.4.1.2: build (lib)

--  While building package filepath-1.4.1.2 using:
      /home/sibi/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0 build lib:filepath --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/sibi/github/stack/test/integration/tests/mutable-deps/files/.stack-work/logs/filepath-1.4.1.2.log

    Configuring filepath-1.4.1.2...
    Preprocessing library for filepath-1.4.1.2..
    Building library for filepath-1.4.1.2..

    /home/sibi/github/stack/test/integration/tests/mutable-deps/files/filepath-1.4.1.2/System/FilePath/Posix.hs:1:1: error:
        File name does not match module name:
        Saw: ‘Main’
        Expected: ‘System.FilePath.Posix’
      |
    1 | {-# LANGUAGE CPP #-}
      | ^
Main.hs: Exited with exit code: ExitFailure 1
CallStack (from HasCallStack):
  error, called at ../../../lib/StackTest.hs:132:14 in main:StackTest
```
…eism7-fix-3863

Make stack clean be more thorough by default (supersedes commercialhaskell#4385)
…ve-with-docker

SkipDocker data constructor never used
@snoyberg
Copy link
Contributor

I just merged in master and added an integration test. Assuming no concerns with the updates, this should be ready to go now.

@snoyberg snoyberg merged commit 91b8bc4 into commercialhaskell:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants