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

IHP+Flake+Devenv up error opening sockets. #1227

Closed
Montmorency opened this issue May 23, 2024 · 3 comments
Closed

IHP+Flake+Devenv up error opening sockets. #1227

Montmorency opened this issue May 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Montmorency
Copy link

Describe the bug
When starting a development environment (standard ihp project) with devenv up and using the default devenv process manager I get an error:

{"level":"warn","error":"open /Users/.../Library/Application Support/process-compose/settings.yaml: no such file or directory","time":"2024-05-23T16:24:56+01:00","message":"Error reading settings file /Users/.../Library/Application Support/process-compose/settings.yaml"}
24-05-23 16:24:56.884 FTL start UDS http server on /tmp/nix-shell.0zxBNB/nix-shell.zEufCC/devenv-9f3dfbd/pc.sock failed error="listen unix /tmp/nix-shell.0zxBNB/nix-shell.zEufCC/devenv-9f3dfbd/pc.sock: bind: no such file or directory"

If I overwrite the default flake config to use a different process manager (overmind):

system    | Tmux socket name: overmind-ihp-ulhg-bsc-9Ue8XgkwBZMgn9gmIUT6a
system    | Tmux session ID: ihp-ulhg-bsc
system    | Listening at /tmp/nix-shell.0zxBNB/nix-shell.zEufCC/nix-shell.y3b8AK/devenv-9f3dfbd/overmind.sock
overmind: listen unix /tmp/nix-shell.0zxBNB/nix-shell.zEufCC/nix-shell.y3b8AK/devenv-9f3dfbd/overmind.sock: bind: no such file or directory

To reproduce
https://gist.github.com/Montmorency/81b4814ab914c9d7592c8883af41e07d

ihp-new

nix develop --impure

devenv up

The error seems to occur with process-compose and overriding the default to use overmind as process manager gives the error. It disappears in previous versions of the flake.

The flake can be changed:

                devenv.shells.default = {
                    process.implementation = "overmind"; # overrides process-compose
                    processes.frontend.exec = ''make watch-frontend'';
                    #process.implementation= "process-compose";
                    #processes.emacs.exec = ''emacs'';
                    #processes.frontend.process-compose = {
                    #                  command = "make watch-frontend";
                    #                  };
                };

Version
devenv: 1.0.4
Using the latest flake IHP configuration (https://github.com/digitallyinduced/ihp)
Paste the output of $ devenv version here or tell us if you're using flakes.

@Montmorency Montmorency added the bug Something isn't working label May 23, 2024
@sandydoo
Copy link
Member

sandydoo commented May 23, 2024

This the same issue as #1153. There's a PR to try to solve this #1157.

What's happening is that nix develop is modifying $TMPDIR after we evaluate the devenv shell. When you then run devenv up, we (currently) need to re-evaluate the config. This picks up the new $TMPDIR, but doesn't re-run the entire set up that creates temporary directories and so on.

One workaround is to use direnv instead of manually running nix develop. I think the IHP template ships with an .envrc for that. direnv will reset the TMPDIR for you.

@sandydoo
Copy link
Member

@Montmorency, we've merged https://github.com/cachix/devenv/pull/1157/files. You'll have to override the devenv input to pick up the changes.

@Montmorency
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants