Don't build with -warn-error +A for releases#38
Merged
xavierleroy merged 2 commits intoocaml:masterfrom Nov 11, 2023
Merged
Conversation
It's no longer required (and broken) since PR#29.
Use Dune's env stanza to apply -warn-error +A only in the (default) dev profile. The Makefile now recognises an equivalent PROFILE variable which should be either be auto, dev, or release. If the build tree includes a .git directory then the dev profile is assumed. CI explicitly specifies PROFILE=dev and the opam installation explicitly specifies PROFILE=release.
Member
Author
|
It would also be possible (and obviously simpler) to have it that |
xavierleroy
approved these changes
Nov 11, 2023
Contributor
xavierleroy
left a comment
There was a problem hiding this comment.
Looks good to me. We should do this (warnings as errors for development and CI but not for released versions) more systematically.
Contributor
|
Piggy-backing on this PR: what about a v1.5 release? The previous release was 3 years ago... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dune already has the concept of development and release profiles - this PR uses that to apply
-warn-error +Aonly in development mode. Formake, I've introduced an equivalentPROFILEvariable which does the same thing.dune build @allalways build in the dev profile by default. IfPROFILEis not specified formake, then it will assumePROFILE=devif the.gitdirectory exists. That means old school(/distro 🙂) installing from release tarballs will use release mode by default.CI explicitly specifies
PROFILE=devand the opam installation explicitly specifiesPROFILE=release.