Skip to content

Prune Setup.hs #7127

Closed as not planned
Closed as not planned
@lawcho

Description

@lawcho

Does Agda really need a Setup.hs file?

Reasons to migrate away from Setup.hs:

  • Cabal discourages using Setup.hs
  • Setup.hs prevents cross-compilation
  • 1 extra file in the repo root
  • 1 extra level of indirection in Agda's build
  • Lack of developer documentation
    • about why Setup.hs is needed at all
    • about what should go in Setup.hs vs e.g. the .cabal file
  • Tight (& un-documented) coupling with other parts of the codebase
    • e.g. with the Makefile, regarding the -quicker suffix
    • e.g. with Agda's command-line & IOTCM APIs, which it calls
  • Other techniques exist for managing run-time data files (e.g. .agdai)
    • Case study: https://github.com/jgm/pandoc
      • Has run-time data files (LaTeX templates, CSS, etc.)
      • Has build-type: Simple (and no Setup.hs file)
      • Data files are checked in to the repo (under a data/)
      • Provides a CLI option for dumping the data files at run time (pandoc -D latex etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabalBuild problems specifically related to cabal-installdevxDeveloper Experience (IDE setup, linting, dev builds, etc.) (not in changelog)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions