Skip to content

Conversation

@wkordalski
Copy link
Contributor

@wkordalski wkordalski commented Mar 15, 2025

Do you know about https://direnv.net/?

It is a nice tool that activates nix flake dev shell when entering project directory and at the same time preserving current shell (instead of executing bash subshell).

Unfortunately it enters infinite loop when shellHook executes inner zsh subshell.
(Direnv activates the development shell, which calls shell hook and creates subshell, in which direnv activates the development shell, which calls shell hook and creates subshell, and so on... )

I think that running zsh in a shell hook is a wrong direction. Most probably direnv is the right solution to your problem.

In short about direnv:

  • set proper NixOS options (or see installation instructions for other OSes)

    programs.direnv = {
      enable = true;
      enableZshIntegration = true;
      enableBashIntegration = true;
      nix-direnv.enable = true;
    };
    
  • create .envrc file with content use flake in the project root directory

  • "allow" direnv to run project's .envrc automatically by executing direnv allow in the project root directory

  • now when entering project directory the "dev shell mode" will be activated (but without running subshell, and thus preserving current shell)


Important

Removes shellHook in flake.nix to fix infinite loop with direnv by preventing zsh subshell execution.

  • Behavior:
    • Removes shellHook in flake.nix that executed zsh, which caused an infinite loop with direnv.
  • Compatibility:
    • Ensures compatibility with direnv by preventing subshell execution.

This description was created by Ellipsis for a532069. It will automatically update as commits are pushed.

It is a nice tool that activates nix flake dev shells when entering project directory.
Unfortunatelly it enters infinite loop when shellHook executes another inner zsh shell.
@wkordalski wkordalski requested review from cte and mrubens as code owners March 15, 2025 10:40
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2025

⚠️ No Changeset found

Latest commit: a532069

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the bug Something isn't working label Mar 15, 2025
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
* added initial AWS bedrock support

* fixed formatting

* updated to fix persistence

* added changeset
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Mar 17, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 17, 2025
@cte cte merged commit 72f9162 into RooCodeInc:main Mar 17, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants