This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 15 Nov, 2016 4 commits
  2. 14 Nov, 2016 7 commits
  3. 13 Nov, 2016 2 commits
  4. 12 Nov, 2016 2 commits
    • Duncan Coutts's avatar
      Update test case BuildTargetErrors/non-buildable · 543b28a1
      Duncan Coutts authored
      Since this fixes #3858
      543b28a1
    • Duncan Coutts's avatar
      Fix implementation of addBuildableCondition · 40d1b4f1
      Duncan Coutts authored
      The addBuildableCondition function was added to solve the problem with
      "buildable: False". The problem was that we would solve or check
      dependencies on the basis of the component in question being needed, and
      then at the end discover that the component is actually not buildable at
      all, and if we'd known that up front we would not have solved for the
      component's dependencies.
      
      The trick that addBuildableCondition does is a syntactic transformation,
      from components like:
      
      executable blah
        buildable: False
        build-depends: foo >= 1, bar < 2
        something-else: whatever
      
      to:
      
      executable blah
        -- empty!
      
      Or at least, that's the intention. In the above situation the
      implementation of addBuildableCondition returns an empty CondNode:
      
      CondNode mempty mempty []
      
      The type at which mempty is used is important here. This transformation
      is used in two places: one in the solver and the other in finalizePD.
      In the solver the mempty is used at types from the PackageDescription:
      Library, Executable, TestSuite etc. So in this case the transformation
      works fine we end up with empty executables, test suites etc.
      
      In finalizePD however the mempty gets used at type PDTagged (which is
      sort of a union of Library, Executable etc plus none/null) and the
      mempty for PDTagged is PDNull which means it does not even specify
      which component we're referring to. So effectively that means instead of
      ending up with an empty executable in the above example, we end up
      deleting the executable entirely!
      
      This was a change in behaviour. Prior to adding addBuildableCondition
      the result of finalizePD would include non-buildable components and the
      rest of the build system infrastructure was set up to skip over them
      when building. The change was not noticed precisely because the rest of
      the system was already set up to ignore non-buildable components.
      
      This is not however a benign change in behaviour. In particular in
      cabal-install in the install plan we end up completley forgetting about
      all the non-buildable components. This means we cannot even report that
      components are non-buildable when users ask to build them, because we've
      completely forgotten that they exist.
      
      So this patch keeps the original addBuildableCondition for use by the
      solver since the solver uses it at sensible monoid types. The patch adds
      a special version for the PDTagged type which changes the transformation
      so that in the above example we end up with:
      
      executable blah
        buildable: False
        something-else: whatever
      
      So we've stripped out all the build-depends but we keep everything else,
      including of course the "buildable: False".
      40d1b4f1
  5. 11 Nov, 2016 3 commits
  6. 09 Nov, 2016 4 commits
  7. 08 Nov, 2016 1 commit
  8. 07 Nov, 2016 1 commit
  9. 06 Nov, 2016 5 commits
    • Oleg Grenrus's avatar
      Merge pull request #4089 from ezyang/pr/parsec-data-word-import · 915ca233
      Oleg Grenrus authored
      Fix redundant import warning from Parsec.
      915ca233
    • Herbert Valerio Riedel's avatar
      Merge pull request #4083 from hvr/pr/plan-json-pkgid · 925278a5
      Herbert Valerio Riedel authored
      Add more fields to plan.json schema
      
      [skip ci] to reuse ci-status from PR
      925278a5
    • Edward Z. Yang's avatar
      a9d56fe1
    • Herbert Valerio Riedel's avatar
      Add more fields to plan.json schema · d2f7845d
      Herbert Valerio Riedel authored
      This adds the following new fields:
      
       - `.compiler-id`
       - `.os`
       - `.arch`
       - `.install-plan[].pkg-name`
       - `.install-plan[].pkg-version`
       - `.install-plan[].pkg-src-sha256`
      
      Having separate "pkg-{name,version}" fields is desirable because the "id"-field
      is actually a UnitId which is supposed to be an opaque id which may not
      always be easily convertible into a PackageId via string operations.
      
      The "pkg-src-sha256" is generally useful to uniquely identify a
      source-tarball (when the package-id is not exact enough).
      
      Finally, the compiler-id/os/arch information is needed to determine the
      values of the respective impl()/os()/arch() predicates used in
      conditionals in .cabal files.
      
      Here's an example demonstrating the new fields:
      
          {
            "cabal-version": "1.25.0.0",
            "cabal-lib-version": "1.25.0.0",
            "compiler-id": "ghc-8.0.1",
            "os": "linux",
            "arch": "x86_64",
            "install-plan": [
      	{
      	  "type": "configured",
      	  "id": "StateVar-1.1.0.4-048d5d25d5813f17f152f9e766fe3ea0ef6f5317439aa115f3fc24e53a0e3c17",
      	  "pkg-name": "StateVar",
      	  "pkg-version": "1.1.0.4",
      	  "flags": {},
      	  "style": "global",
      	  "pkg-src-sha256": "7ad68decb5c9a76f83c95ece5fa13d1b053e4fb1079bd2d3538f6b05014dffb7",
      	  "depends": [
      	    "base-4.9.0.0",
      	    "stm-2.4.4.1-2c7789312d2396a91db173e1ae8cf3a9af3dd18de42bb1021c4978fbab49c191",
      	    "transformers-0.5.2.0"
      	  ],
      	  "exe-depends": [],
      	  "component-name": "lib"
      	},
              {
                "type": "pre-existing",
                "id": "rts",
                "pkg-name": "rts",
                "pkg-version": "1.0",
                "depends": []
              },
      	{
      	  "type": "configured",
      	  "id": "hackage-matrix-builder3-0.3-inplace-matrix-lib",
      	  "pkg-name": "hackage-matrix-builder3",
      	  "pkg-version": "0.3",
      	  "component-name": "lib:matrix-lib"
      	  ...
      	}
      	...
          }
      d2f7845d
    • Edward Z. Yang's avatar
      Improve error output when package fails to build. · da9c0526
      Edward Z. Yang authored
      
      
      New error message is:
      
      cabal: Failed to build p-1.0 (which is required by exe:e4 from p-1.0, exe:e3
      from p-1.0 and others).
      
      Fixes #4081.
      
      TODO: Use these utility functions in other appropriate places.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      da9c0526
  10. 05 Nov, 2016 2 commits
  11. 04 Nov, 2016 2 commits
  12. 03 Nov, 2016 3 commits
    • Mikhail Glushenkov's avatar
      Formatting. · 3d6dbe69
      Mikhail Glushenkov authored
      Before:
      
          cabal new-build               Build the package in the current
        directory or all packages in the project
          cabal new-build pkgname       Build the package named pkgname in the
        project
          cabal new-build cname       Build the component named cname in the
        project
          cabal new-build pkgname:cname       Build the component named cname
        in the package pkgname
      
      After:
      
          cabal new-build               Build the package in the current
        directory or all packages in the project
          cabal new-build pkgname       Build the package named pkgname in the
        project
          cabal new-build cname         Build the component named cname in the
        project
          cabal new-build pkgname:cname Build the component named cname in the
        package pkgname
      3d6dbe69
    • Mikhail Glushenkov's avatar
      Merge pull request #4077 from 23Skidoo/new-configure-more-correct-plan-subset · b861044f
      Mikhail Glushenkov authored
      new-configure: Select the same plan subset as new-build.
      b861044f
    • Mikhail Glushenkov's avatar
      Merge pull request #4076 from ezyang/pr/sanityCheckHookedBuildInfo-fixup · 3be1b3a0
      Mikhail Glushenkov authored
      Fix missing line pointed out by @abooij.
      3be1b3a0
  13. 02 Nov, 2016 4 commits
    • Edward Z. Yang's avatar
      a42a1b3d
    • Mikhail Glushenkov's avatar
      new-configure: Select the same plan subset as new-build. · 46d1b0c2
      Mikhail Glushenkov authored
      Before:
      
      $ cabal new-configure
      Resolving dependencies...
      In order, the following would be built (use -v for more details):
       - Crypto-4.2.5.1 (exe:SymmetricTest) (requires build)
       - Crypto-4.2.5.1 (exe:WordListTest) (requires build)
       - Crypto-4.2.5.1 (exe:SHA1Test) (requires build)
       - Crypto-4.2.5.1 (exe:QuickTest) (requires build)
       - Crypto-4.2.5.1 (exe:RSATest) (requires build)
       - Crypto-4.2.5.1 (exe:HMACTest) (requires build)
       - HaXml-1.25.3 (exe:Xtract) (requires build)
       - HaXml-1.25.3 (exe:Validate) (requires build)
       - HaXml-1.25.3 (exe:MkOneOf) (requires build)
       - HaXml-1.25.3 (exe:CanonicaliseLazy) (requires build)
       - HaXml-1.25.3 (exe:Canonicalise) (requires build)
       - HaXml-1.25.3 (exe:XsdToHaskell) (requires build)
       - HaXml-1.25.3 (exe:DtdToHaskell) (requires build)
       - HaXml-1.25.3 (exe:FpMLToHaskell) (requires build)
       - aeson-pretty-0.8.1 (exe:aeson-pretty) (requires build)
       - cpphs-1.20.2 (exe:cpphs) (requires build)
       - hS3-0.5.9 (exe:hs3) (requires build)
       - yaml-0.8.18 (exe:json2yaml) (requires build)
       - yaml-0.8.18 (exe:yaml2json) (requires build)
      
      $ cabal new-build
      Resolving dependencies...
      Up to date
      
      After:
      
      $ cabal new-configure
      Resolving dependencies...
      Up to date
      
      $ cabal new-build
      Resolving dependencies...
      Up to date
      46d1b0c2
    • Mikhail Glushenkov's avatar
      Removed unneeded LANGUAGE pragma. · a078b55e
      Mikhail Glushenkov authored
      a078b55e
    • Mikhail Glushenkov's avatar
      Whitespace. · e815863f
      Mikhail Glushenkov authored
      e815863f