WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Tom-Hubrecht
Copy link
Contributor

@Tom-Hubrecht Tom-Hubrecht commented Dec 8, 2025

Correctly set the abort-on-warn option in the modules.sh tests.

Note that checkConfigError 'The deprecated .*functor.wrappedattribute .*is accessed, use.*nestedTypes.elemType instead.' options.attrsWith.type.functor.wrapped ./deprecated-wrapped.nix still errors out when abort-on-warn = false because it tries to serialize thunks (and if forced would serialize lambdas)

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 6.topic: module system About "NixOS" module system internals 6.topic: lib The Nixpkgs function library labels Dec 8, 2025
@roberth
Copy link
Member

roberth commented Dec 8, 2025

Weird, I made it intentionally compatible with the old lib.warn.

$ NIX_ABORT_ON_WARN=1 nix-instantiate --eval --expr 'builtins.warn "hoi" null'
evaluation warning: hoi
error:
       … while calling the 'warn' builtin
         at «string»:1:1:
            1| builtins.warn "hoi" null
             | ^

       error: aborting to reveal stack trace of warning, as abort-on-warn is set

Copy link
Member

@lf- lf- left a comment

Choose a reason for hiding this comment

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

yeah this looks good to me.

@lf-
Copy link
Member

lf- commented Dec 8, 2025

Weird, I made it intentionally compatible with the old lib.warn.

$ NIX_ABORT_ON_WARN=1 nix-instantiate --eval --expr 'builtins.warn "hoi" null'
evaluation warning: hoi
error:
       … while calling the 'warn' builtin
         at «string»:1:1:
            1| builtins.warn "hoi" null
             | ^

       error: aborting to reveal stack trace of warning, as abort-on-warn is set

I know you did, but we want to get rid of environment variables, and the Lix implementation of builtins.warn isn't going to support the legacy environment variable.

@roberth
Copy link
Member

roberth commented Dec 8, 2025

Ok I guess

@roberth roberth enabled auto-merge December 8, 2025 18:30
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 8, 2025
@roberth roberth added this pull request to the merge queue Dec 8, 2025
Merged via the queue into NixOS:master with commit 0b2ab80 Dec 8, 2025
37 of 39 checks passed
@RaitoBezarius
Copy link
Member

the Lix implementation of builtins.warn isn't going to support the legacy environment variable.

it doesn't.

❯ NIX_ABORT_ON_WARN=1 nix-instantiate --eval --expr 'builtins.warn "hoi" null'                            
warning: hoi
null

@Tom-Hubrecht
Copy link
Contributor Author

This would also need a backport to 25.11

@roberth roberth added the backport release-25.11 Backport PR automatically label Dec 9, 2025
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Dec 9, 2025

Successfully created backport PR for release-25.11:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lib The Nixpkgs function library 6.topic: module system About "NixOS" module system internals 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. backport release-25.11 Backport PR automatically

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants