Skip to content

lib.types.string: Deprecation error instead of warning#247848

Merged
roberth merged 1 commit intoNixOS:masterfrom
infinisil:deprecate-lib.types.string
Aug 8, 2023
Merged

lib.types.string: Deprecation error instead of warning#247848
roberth merged 1 commit intoNixOS:masterfrom
infinisil:deprecate-lib.types.string

Conversation

@infinisil
Copy link
Member

@infinisil infinisil commented Aug 8, 2023

Description of changes

The type has given a warning on use since 4 years ago, I think it's safe to move the deprecation to the next stage: An error instead of a warning.

Before:

trace: warning: The type `types.string' of option `foo.enable' defined in `<unknown-file>' is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.

After:

error: The type `types.string` is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.

Things done

  • Tested it manually

The type has given a warning on use since [4 years ago](03392cd336b128a1639c648baf0f6c1a1271e0d2), I think it's safe to move the deprecation to the next stage: An error instead of a warning.
@infinisil infinisil requested a review from edolstra as a code owner August 8, 2023 02:22
@infinisil infinisil added the 6.topic: module system About "NixOS" module system internals label Aug 8, 2023
@github-actions github-actions bot added the 6.topic: lib The Nixpkgs function library label Aug 8, 2023
@infinisil infinisil requested a review from roberth August 8, 2023 02:22
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Aug 8, 2023
@roberth roberth merged commit 69d4b01 into NixOS:master Aug 8, 2023
@infinisil infinisil deleted the deprecate-lib.types.string branch August 8, 2023 09:55
@jian-lin jian-lin mentioned this pull request Aug 8, 2023
12 tasks
@jian-lin
Copy link
Contributor

jian-lin commented Aug 8, 2023

After this PR is merged, github actions of building NixOS manual fail because of existing usage of types.string. I have made a PR to change all of them so that NixOS manual can be built again.

jian-lin added a commit to linj-fork/nixpkgs that referenced this pull request Aug 8, 2023
@jian-lin jian-lin mentioned this pull request Aug 8, 2023
12 tasks
calbrecht added a commit to calbrecht/home-manager that referenced this pull request Aug 8, 2023
ncfavier pushed a commit to nix-community/home-manager that referenced this pull request Aug 8, 2023
@infinisil
Copy link
Member Author

This was a mistake, see the revert in #248278

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/nix-build-errors-out-nixos-unstable/31642/5

LunNova added a commit to LunNova/nixos-configs that referenced this pull request Aug 13, 2023
Broke due to NixOS/nixpkgs#247848 making it an error, was no deprecation warning
Luflosi pushed a commit to Luflosi/home-manager that referenced this pull request Aug 15, 2023
Luflosi pushed a commit to Luflosi/home-manager that referenced this pull request Aug 15, 2023
ncfavier pushed a commit to ncfavier/home-manager that referenced this pull request Aug 15, 2023
ncfavier added a commit to nix-community/home-manager that referenced this pull request Aug 15, 2023
Since the merge of NixOS/nixpkgs#247848

(cherry picked from commit 7b8d43f)

Co-authored-by: Christian Albrecht <[email protected]>
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 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants