Skip to content

resolveLookupPathPath(): Fix caching of negative lookups #12481

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

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

edolstra
Copy link
Member

Motivation

This avoids spamming "Nix search path entry does not exist" (#12480).

Also, we no longer add entries to the default search path if their symlink target doesn't exist.

Context


Add 👍 to pull requests you find important.

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

@edolstra edolstra added the backport 2.26-maintenance Automatically creates a PR against the branch label Feb 17, 2025
@@ -57,7 +57,7 @@ Strings EvalSettings::getDefaultNixPath()
{
Strings res;
auto add = [&](const Path & p, const std::string & s = std::string()) {
if (pathAccessible(p)) {
if (std::filesystem::exists(p)) {
Copy link
Member

Choose a reason for hiding this comment

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

:)

@Ericson2314 Ericson2314 merged commit 2ea8d35 into NixOS:master Feb 17, 2025
12 checks passed
@Ericson2314 Ericson2314 added the backport 2.24-maintenance Automatically creates a PR against the branch label Feb 17, 2025
Ericson2314 added a commit that referenced this pull request Feb 17, 2025
…2481

resolveLookupPathPath(): Fix caching of negative lookups (backport #12481)
@edolstra edolstra deleted the search-path-spam branch February 17, 2025 18:54
edolstra added a commit that referenced this pull request Feb 18, 2025
…2481

resolveLookupPathPath(): Fix caching of negative lookups (backport #12481)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.24-maintenance Automatically creates a PR against the branch backport 2.26-maintenance Automatically creates a PR against the branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants