Skip to content

Conversation

@andreasabel
Copy link
Member

@andreasabel andreasabel commented Feb 20, 2025

This simplifies the release process, as one does not need to manually replace -Werror by -Wwarn before release.

Closes #7714.

This simplifies the release process, as one does not need to manually
replace -Werror by -Wwarn before release.
@andreasabel andreasabel added release Concerning the release process and releases (not in changelog) build Concerning building of Agda labels Feb 20, 2025
@andreasabel andreasabel added this to the 2.8.0 milestone Feb 20, 2025
@andreasabel andreasabel self-assigned this Feb 20, 2025
@wenkokke
Copy link
Contributor

wenkokke commented Feb 20, 2025

It might be confusing to simply call the flag Werror, since that's verbatim a GHC flag?

It might be better to link this behavior to some more abstract flag, such as --develop with the default False, set to True in the cabal.project file?

That way, the flag can be made to carry more water later on, such as affecting the available tests?

@wenkokke
Copy link
Contributor

Alternatively, we could just set the -Werror GHC option in the cabal.project file and not introduce a new flag at all?

@andreasabel andreasabel marked this pull request as draft February 21, 2025 07:25
@andreasabel
Copy link
Member Author

Alternatively, we could just set the -Werror GHC option in the cabal.project file and not introduce a new flag at all?

Indeed, good point.

However, this requires us to drop v1-cabal in the development process because cabal.project is only supported by v2-cabal.
We still have v1-install because v2-install rebuilds everything every single time, AFAIK.
(Stack does not have this problem, but we will not likely switch development to stack-only.)
One can work around v2-install by just using v2-build and then copy the executables located by cabal list-bin to the installdir.
However, Agda also needs its data-files, which could be solved by file-embed.

So, the action plan could look be this sequence:

  1. Embed the data-files into the executable (as discussed)
  2. Drop v1-cabal and adjust the Makefile so that the developer convenience goals like make agda-quicker use v2-build and copy the exectuable.
  3. Drop -Werror from Agda.cabal and add it to cabal.project (and stack.yaml).
  4. Split off the test-suite (PR WIP: make agda-tests into its own package #7717) into its own package.

To solve the Agda version problem with the git commit hash we could place this under a develop flag that would be off by default (to simplify releases) but on in cabal.project (and stack.yaml).

@nad
Copy link
Collaborator

nad commented Feb 21, 2025

Alternatively, we could just set the -Werror GHC option in the cabal.project file and not introduce a new flag at all?

Is the idea that this file should not be part of the release? Does cabal sdist not include cabal.project?

@wenkokke
Copy link
Contributor

wenkokke commented Feb 22, 2025

@nad Project files are ignored if they're not the main project file.

I have checked (with cabal v2-sdist --list-only) and project files are not included.

@andreasabel
Copy link
Member Author

Well, Hackage only accepts individual packages, defined by a .cabal file, and not package collections, as would be defined by a cabal.project or stack.yaml file. So these files do not make sense in a package distribution and are not included.
As a consequence, everything in cabal.project or stack.yaml is developer-only.

But this is a common confusion.

Note that we ship stack.yaml files anyway to allow building with Stack in a convenient way. These files are often needed as they specify extra-deps that complement a Stackage snapshot in a way necessary to build Agda. My goal is that Stackage has all dependencies that Agda needs, so a simple e.g. stack install --resolver=lts-21.25 is possible, but as we cannot update old LTSs, we cannot achieve this goal always for older GHCs.

@andreasabel andreasabel modified the milestones: 2.8.0, 2.9.0 May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Concerning building of Agda release Concerning the release process and releases (not in changelog)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create release version with Cabal flag instead of by editing files

4 participants