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

inconsistency in solving/planning(?) #4148

Closed
hvr opened this issue Dec 1, 2016 · 7 comments
Closed

inconsistency in solving/planning(?) #4148

hvr opened this issue Dec 1, 2016 · 7 comments

Comments

@hvr
Copy link
Member

hvr commented Dec 1, 2016

I just ran into this weird situation:

$ cabal get hakyll-4.9.2.0
Unpacking to hakyll-4.9.2.0/

$ cd hakyll-4.9.2.0/
$ cabal new-build -w ghc-7.10.3
Resolving dependencies...
In order, the following will be built (use -v for more details):
 - hakyll-4.9.2.0 {hakyll-4.9.2.0-inplace-hakyll-init} (exe:hakyll-init) (first run)
 - pandoc-citeproc-0.10.3 {pandoc-citeproc-0.10.3-5c3ba26facbb19ac48e6fbd28aa16da7852c52bbebbaba6e4e2590ec3cda9530} (lib:pandoc-citeproc) (requires build)
 - hakyll-4.9.2.0 {hakyll-4.9.2.0-inplace} (lib) (first run)
Configuring component exe:hakyll-init from hakyll-4.9.2.0
Configuring  pandoc-citeproc-0.10.3-5c3ba26facbb19ac48e6fbd28aa16da7852c52bbebbaba6e4e2590ec3cda9530 (all, due to Custom setup)
Preprocessing executable 'hakyll-init' for hakyll-4.9.2.0...
[1 of 3] Compiling Paths_hakyll     ( /tmp/hakyll-4.9.2.0/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hakyll-4.9.2.0/c/hakyll-init/build/hakyll-init/autogen/Paths_hakyll.hs, /tmp/hakyll-4.9.2.0/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hakyll-4.9.2.0/c/hakyll-init/build/hakyll-init/hakyll-init-tmp/Paths_hakyll.o )
[2 of 3] Compiling Hakyll.Core.Util.File ( src/Hakyll/Core/Util/File.hs, /tmp/hakyll-4.9.2.0/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hakyll-4.9.2.0/c/hakyll-init/build/hakyll-init/hakyll-init-tmp/Hakyll/Core/Util/File.o )
[3 of 3] Compiling Main             ( src/Hakyll/Init.hs, /tmp/hakyll-4.9.2.0/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hakyll-4.9.2.0/c/hakyll-init/build/hakyll-init/hakyll-init-tmp/Main.o )
Linking /tmp/hakyll-4.9.2.0/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hakyll-4.9.2.0/c/hakyll-init/build/hakyll-init/hakyll-init ...

Failed to build pandoc-citeproc-0.10.3. The failure occurred during the
configure step.
Build log (
/home/hvr/.cabal/logs/ghc-7.10.3/pandoc-citeproc-0.10.3-5c3ba26facbb19ac48e6fbd28aa16da7852c52bbebbaba6e4e2590ec3cda9530.log
):
[1 of 1] Compiling Main             ( /tmp/hakyll-4.9.2.0/dist-newstyle/tmp/src-3565/pandoc-citeproc-0.10.3/dist/setup/setup.hs, /tmp/hakyll-4.9.2.0/dist-newstyle/tmp/src-3565/pandoc-citeproc-0.10.3/dist/setup/Main.o )
Linking /tmp/hakyll-4.9.2.0/dist-newstyle/tmp/src-3565/pandoc-citeproc-0.10.3/dist/setup/setup ...
Configuring pandoc-citeproc-0.10.3...
setup: At least the following dependencies are missing:
process -any, temporary >=1.1
cabal: Failed to build pandoc-citeproc-0.10.3 (which is required by
hakyll-4.9.2.0). See the build log above for details.

However, the only components in pandoc-citeproc which seem to require those two packages seem to be

executable test-citeproc
  Main-Is:        test-citeproc.hs
  Other-Modules:  JSON
                  Prelude
  Hs-Source-Dirs: tests, prelude
  if flag(test_citeproc)
    Buildable:    True
  else
    Buildable:    False
  build-depends:  base >= 4, aeson, directory, text,
                  pandoc-types >= 1.16 && < 1.18,
                  pandoc >= 1.16 && < 1.20,
                  filepath,
                  bytestring, pandoc-citeproc, process, temporary >= 1.1,
                  yaml >= 0.8.8.7, containers >= 0.4, vector >= 0.10
  default-language: Haskell2010

test-suite test-pandoc-citeproc
  Type:           exitcode-stdio-1.0
  Main-Is:        test-pandoc-citeproc.hs
  Other-Modules:  JSON
                  Prelude
  Hs-Source-Dirs: tests, prelude
  build-depends:  base >= 4, aeson, directory, text,
                  pandoc-types >= 1.16 && < 1.18,
                  pandoc >= 1.16 && < 1.20, filepath,
                  bytestring, pandoc-citeproc, process, temporary >= 1.1,
                  yaml >= 0.8.8.7
  default-language: Haskell2010

And the flag settings according to plan.json were

    {
      "type": "configured",
      "id": "pandoc-citeproc-0.10.3-5c3ba26facbb19ac48e6fbd28aa16da7852c52bbebbaba6e4e2590ec3cda9530",
      "pkg-name": "pandoc-citeproc",
      "pkg-version": "0.10.3",
      "flags": {
        "unicode_collation": false,
        "test_citeproc": false,
        "embed_data_files": false,
        "debug": false,
        "bibutils": true
      },

Nor where any of those components mentioned in the components list in plan.json...

/cc @ezyang @dcoutts

@hvr
Copy link
Member Author

hvr commented Dec 1, 2016

After more experimentation it looks like it's the executable test-citeproc's build-depends fault; it looks like Cabal-1.22.5 doesn't honour buildable: False ... is this a known issue?

@ezyang
Copy link
Contributor

ezyang commented Dec 1, 2016

Yes, this is #1725

@hvr
Copy link
Member Author

hvr commented Dec 1, 2016

@ezyang wow... I even forgot I commented there... :-)

IOW, 53d85bb would need to be backported to Cabal-1.22.x ? Or rather, can we somehow tweak new-build to use Cabal-1.24 more eagerly (i.e. be less biased to use the globally installed Cabal lib version)

@grayjay
Copy link
Collaborator

grayjay commented Dec 2, 2016

There is also a new-build issue: #3881

@hvr
Copy link
Member Author

hvr commented Dec 2, 2016

Hrm... looking at #3337, what about a refined heuristic forcing >=1.24 only if we detect problematic uses of buildable? like e.g. buildable: False being active, while there's still build-depends-lines active as well? Or even more exact: if there's a build-depends active which requires items not contained in the plan.

@ezyang
Copy link
Contributor

ezyang commented Dec 5, 2016

I guess it's OK, and there's prior art for it, although the heuristic would be annoying to compute.

@grayjay
Copy link
Collaborator

grayjay commented Mar 12, 2017

Closing as a duplicate of #3881. I was able to build hakyll by adding --constraint='pandoc-citeproc:setup.Cabal >= 1.24'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants