This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Mirror nix’s default.nix
mechanism in path discovery
#58
Labels
bug
Something isn't working
P1
critical: next release
user-facing
Improvement that increases user experience
Comments
Profpatsch
added
bug
Something isn't working
P2
major: an upcoming release
user-facing
Improvement that increases user experience
labels
Apr 10, 2019
Profpatsch
added
P1
critical: next release
and removed
P2
major: an upcoming release
labels
Apr 11, 2019
I think the solution here is to extend LogDatam to have an EvalSource variant: Lines 128 to 131 in f93989b
and then make use of the LogDatum::EvalSource here: Lines 155 to 156 in f93989b
then when we're adding the list of paths at: Line 101 in f93989b
match EvalSource, do an |
Profpatsch
added a commit
that referenced
this issue
Sep 5, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Sep 5, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Oct 4, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Oct 4, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Oct 4, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Oct 4, 2019
We shouldn’t emit any paths to the watcher that are not strictly necessary; the default.nix logic ensures that we only watch the special `default.nix` file if a directory is imported. This test checks that that is actually the case. In the future it should be extended for other cases of watching too much, once we discover them. For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Profpatsch
added a commit
that referenced
this issue
Oct 7, 2019
For a directory import like `import ./foo`, nix imports `./foo/default.nix` but only prints `./foo` to its log output. This commit reproduces that behaviour. We were watching way too many files, e.g. `import <nixpkgs> {}` meant we’d watch all of nixpkgs recursively. This should be solved now. Fixes #58
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug
Something isn't working
P1
critical: next release
user-facing
Improvement that increases user experience
I forgot to post my findings, but yes this is true! Nix doesn't emit
/path/to/default.nix
as the true file, it emits just '/path/to. A possible solution here is to append a
/default.nix` when an imported directory is identified.Originally posted by @grahamc in #21
We currently watch the whole directory if a user does
import /path/to/directory
. Nix implicitely assumes/path/to/directory/default.nix
if used withimport
. We should mirror that, to prevent watching too many files.The text was updated successfully, but these errors were encountered: