Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. May 11, 2024
    • sheaf's avatar
      Add NoImplicitPrelude to buildTypeScript · 42b8dc1f
      sheaf authored
      This allows us to compile Setup.hs without depending on base.
      In particular, this ensures that a package with `build-type: Hooks`
      and a custom setup stanza that does not depend on base successfully
      compiles.
      
      Tested in PackageTests/SetupHooks/SetupHooksNoBase.
      42b8dc1f
  2. Apr 18, 2024
    • sheaf's avatar
      Introduce SetupHooks · c5f99331
      sheaf authored
      This commit introduces a new build-type, Hooks. A package using this
      build type should provide a SetupHooks.hs module which exports
      a value `setupHooks :: SetupHooks`. This is intended to replace the
      Custom setup type. This allows Cabal to have finer-grained information
      about the build, instead of having an opaque Setup executable to invoke.
      
      Tests include:
      
        - error when returning an invalid component diff in a
          per-component pre-configure hook
        - error when declaring pre-build rules whose dependency
          graph contains cycles
        - error when we cannot find a dependency of a pre-build rule
        - warning when there are pre-build rules that are declared but
          never demanded
        - correctness tests for SetupHooks, e.g. that
          pre-build rules are run in dependency order (see the
          `SetupHooksRuleOrdering` test)
      c5f99331
  3. Mar 08, 2024
    • sheaf's avatar
      Testsuite: pass -i argument to runghc invocations · b2b9c2f6
      sheaf authored
      This commit modifies the generation of runghc commands to pass an
      additional -i argument to account for the change in working directory.
      
      This ensures that, in the testsuite, runghc is able to see other modules.
      For example, an invocation of runghc to run a Custom Setup script will
      now properly see the modules imported, e.g. if one has a directory
      structure like
      
        test.cabal
        Setup.hs
        SetupDep.hs
      
      and Setup.hs imports SetupDep.hs.
      b2b9c2f6
Loading