Skip to content

Add a “pedantic” CI build - #10144

Draft
thufschmitt wants to merge 6 commits into
NixOS:masterfrom
tweag:pedantic-ci-build
Draft

thufschmitt wants to merge 6 commits into
NixOS:masterfrom
tweag:pedantic-ci-build

Conversation

@thufschmitt

Copy link
Copy Markdown
Member

Motivation

The default build of Nix is reasonably permissive.
This causes issues because warnings creep in (#10112), people building Nix in other configurations (like downstream packages) uncover issues that we skimmed over (#10095), and dangerous things happen without anyone noticing (e344f85).

Fix that by adding a CI job that will run the build with more warnings and safety checks enabled to uncover these issues as early as possible.

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-55/40996/1

Théophane Hufschmitt added 6 commits March 12, 2024 18:21
Currently only `-Werror`s, but can be strengthen in the future
Try to enforce that we don't rely on any undefined behavior that might
break from under us at any time
The constructor of `EvalSettings` was calling into the global
`evalSettings` (itself of type `EvalSettings`).

This means that `evalSettings`'s constructor was trying to access it
while partially initialized. It seemed to accidentally work because
probably the fields were initialized in the right order, but better
fix it.
The argument to `std::condition_variable::wait_for` is apparently
internally expressed in `ns`, so passing it an argument in `ms` results
in it being multiplied by `1000` internally.
As a consequence, passing `::max()` will overflow.

Instead, pass in a reasonable value that is big-enough to not have any
performance impact, but small enough to not overflow.
@roberth

roberth commented Apr 8, 2024

Copy link
Copy Markdown
Member

idea:
I've noticed that ASSERT_DEATH tests are quite slow. This known to be unavoidable, as some fork trickery is involved.
Perhaps we could exclude these assertions from the normal build, and only run them in the pedantic build.

This branch has not been deployed

No deployments
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.

3 participants