Skip to content

fix: preserve local direnv settings - #26122

Open
VVKot wants to merge 2 commits into
apache:mainfrom
VVKot:vkot/add-envrc-local-overrides
Open

VVKot wants to merge 2 commits into
apache:mainfrom
VVKot:vkot/add-envrc-local-overrides

Conversation

@VVKot

@VVKot VVKot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #26101 , which was introduced in #26005. cc @kumarUjjawal @kosiew

What changes are included in this PR?

Load an ignored .envrc.local after the shared Nix environment so contributors can keep machine-specific settings without modifying tracked files.

Document the Nix, direnv, and local override workflow in the development environment guide.

Following recommendation from direnv: https://github.com/direnv/direnv/blob/e24ea74873aff78d5e371c85061dc7fafdeedd5a/README.md#quick-demo

Are there any user-facing changes?

No.

Load an ignored .envrc.local after the shared Nix environment so contributors can keep machine-specific settings without modifying tracked files.

Document the Nix, direnv, and local override workflow in the development environment guide.

Fixes apache#26101.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 7, 2026
@codecov-commenter

codecov-commenter commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.74%. Comparing base (f9b7f34) to head (1e624b1).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #26122    +/-   ##
========================================
  Coverage   82.73%   82.74%            
========================================
  Files        1147     1147            
  Lines      449459   449767   +308     
  Branches   449459   449767   +308     
========================================
+ Hits       371864   372148   +284     
- Misses      54936    54947    +11     
- Partials    22659    22672    +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kosiew kosiew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@VVKot,

Thanks for adding support for local direnv overrides. The changes look good to me. I have two non-blocking suggestions below.

`direnv allow` from the repository root to load it automatically.

Put machine-specific direnv settings in `.envrc.local`. This file is ignored by
Git and loaded after the shared Nix environment so that local settings take

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we add a short migration note for contributors who already have personal settings in .envrc? They should move those settings into .envrc.local rather than copying the entire shared file, which could duplicate use flake.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me know how the update reads to you

Comment thread .envrc
@VVKot

VVKot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@kosiew addressed + added source_up_if_exists to handle nested .envrc situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracked .envrc from #26005 silently overwrites contributors' local direnv config

3 participants