Skip to content

Use per-component cabal_macros.h  #1893

Closed

Description

@bennofs

I have a project that builds a library and has some benchmarks. Now, everytime I switch the benchmarks from disabled to enabled (I don't enable them all the time to make building faster when only working on the library), cabal_macros.h changes because it has different dependencies than the library. This causes parts of the library to be recompiled. Using a per-component cabal_macros.h would solve the issue.

Activity

  1. added this to the milestone on Apr 24, 2015
  2. self-assigned this
    on Jan 11, 2016
  3. ezyang commented on Jan 11, 2016

    @ezyang
    Contributor

    I think in the course of #3022 I will fix this bug.

  4. removed their assignment
    on Jan 11, 2016
  5. ezyang commented on Jan 11, 2016

    @ezyang
    Contributor

    OK, here's the problem: if we have separate cabal_macros.h per library, the preprocessors need to know about what component they are building. Currently, the Preprocessor interfaces does not get this information, so we'd need to extend this interface. Unfortunately, the preprocessor hooks are a very commonly used interface in Custom setup files, so we need to decide if we're going to break it for more recent Cabal, or try to support this in a backwards compatible way.

    But actually, I think this is OK, because with custom-setup, people who depend on old Cabal won't pick up a breaking version of Cabal.

    By the way, extension point is probably extending

    type PPSuffixHandler
        = (String, BuildInfo -> LocalBuildInfo -> PreProcessor)
    

    to also get a ComponentLocalBuildInfo.

  6. 23Skidoo commented on Jan 11, 2016

    @23Skidoo
    Member

    But actually, I think this is OK, because with custom-setup, people who depend on old Cabal won't pick up a breaking version of Cabal.

    You mean setup-depends? Yes, that's what it's for. We should start taking advantage of it!

  7. added 3 commits that reference this issue on Jan 12, 2016
  8. added 4 commits that reference this issue on Jan 13, 2016
  9. 31 remaining items

  10. added a commit that references this issue on Mar 18, 2016
  11. 23Skidoo commented on Mar 31, 2016

    @23Skidoo
    Member

    #3022 has been merged, I believe that this is fixed now.

  12. modified the milestones: Cabal 2.0, on Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions