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

Calva should not suggest projects in a .devenv/ directory when starting a project REPL and connecting (jack-in) #2642

Open
jackdbd opened this issue Sep 30, 2024 · 1 comment

Comments

@jackdbd
Copy link

jackdbd commented Sep 30, 2024

I use a combination of devenv, deps.edn and bb.edn to create and manage a reproducible developer environment. I declare my system dependencies (e.g. OpenJDK, VS Code) in a devenv.nix file, my Clojure dependencies in a deps.edn file and my Babashka dependencies (e.g. pods) in a bb.edn file. Calva works great with this setup.

The only (very) minor inconvenience is that when I start the project REPL and connect (jack-in), Calva suggests a few projects that are not mine. The .devenv/ directory contains state and variables created and managed by devenv, and should not be tracked by version control (in fact it's usually added to .gitignore).

In a Clojure project, .devenv/state/ or .devenv/profile might contain deps.edn or project.clj files that are not related to my project, but to my dependencies. It's best shown with a screenshot.

calva-devenv

Here my project (i.e the only project I would like Calva REPL to connect to) is pod-jackdbd-jsoup. The other two entries shown in the dropdown menu are deps.edn-based projects that should not be suggested up by Calva.

@PEZ
Copy link
Collaborator

PEZ commented Sep 30, 2024

Hi! Thanks for the report. I see you have issued a PR fixing the default excludes, which is awesome. I'll merge that!

For anyone finding this issue, it's good to keep in mind that you don't need to be content with the defaults. The setting in question is calva.projectRootsSearchExclude, and it can be updated from the Settings UI:

image

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

No branches or pull requests

2 participants