Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't build with -warn-error +A for releases #38

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Nov 9, 2023

Dune already has the concept of development and release profiles - this PR uses that to apply -warn-error +A only in development mode. For make, I've introduced an equivalent PROFILE variable which does the same thing. dune build @all always build in the dev profile by default. If PROFILE is not specified for make, then it will assume PROFILE=dev if the .git directory exists. That means old school(/distro 🙂) installing from release tarballs will use release mode by default.

CI explicitly specifies PROFILE=dev and the opam installation explicitly specifies PROFILE=release.

It's no longer required (and broken) since PR#29.
@dra27 dra27 linked an issue Nov 9, 2023 that may be closed by this pull request
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.
@dra27
Copy link
Member Author

dra27 commented Nov 9, 2023

It would also be possible (and obviously simpler) to have it that make never adds -warn-error +A and we just let Dune be responsible for development mode, but I expect that most of the people who actually maintain num are invoking make!

Copy link
Contributor

@xavierleroy xavierleroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We should do this (warnings as errors for development and CI but not for released versions) more systematically.

@xavierleroy xavierleroy merged commit db2ffb4 into ocaml:master Nov 11, 2023
10 checks passed
@xavierleroy
Copy link
Contributor

Piggy-backing on this PR: what about a v1.5 release? The previous release was 3 years ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't release with -warn-error A
2 participants