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

lib/modules: Make sure to not import module _file's into the store #99115

Merged
merged 1 commit into from Nov 30, 2020

Conversation

infinisil
Copy link
Member

Motivation for this change

Previously if _file was specified by a module:

trace: warning: The type `types.string' of option `foo' defined in `/nix/store/yxhm2il5yrb92fldgriw0wyqh2kk9qyc-bug.nix' is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.

With this change:

trace: warning: The type `types.string' of option `foo' defined in `/home/infinisil/src/nixpkgs/bug.nix' is deprecated. See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.
Things done
  • Tested this with
    with import ./lib;
    evalModules {
      modules = [({ lib, ... }: {
        _file = ./bug.nix;
        options.foo = lib.mkOption {
          type = lib.types.string;
        };
      })];
    }

Previously if `_file` was specified by a module:
  trace: warning: The type `types.string' of option `foo' defined in `/nix/store/yxhm2il5yrb92fldgriw0wyqh2kk9qyc-bug.nix' is deprecated. See NixOS#66346 for better alternative types.

With this change:
  trace: warning: The type `types.string' of option `foo' defined in `/home/infinisil/src/nixpkgs/bug.nix' is deprecated. See NixOS#66346 for better alternative types.
@infinisil infinisil added the 6.topic: module system About NixOS module system internals label Sep 29, 2020
@infinisil infinisil merged commit e081820 into NixOS:master Nov 30, 2020
@infinisil infinisil deleted the toString-module-files branch November 30, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant