-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Support Polylith and monorepo jack-in/connect better #1254
Comments
This sounds great! I usually start my REPL with |
Thanks for confirming this! The selection of aliases is left up to the user today. Right now I can't think of a general solution for adding suggestions for this to a project type. But we should of course add something like: When selecting aliases, always include To the documentation of how to use Calva with Polylith: https://calva.io/polylith/ |
Wow, I've actually been thinking about this menu feature too recently! I've been using Polylith for a project for my job, and have repeatedly tried to jack-in while I have some source file open, and then I have to close that menu (because it uses some sub-level |
Thats going to be major improvement to monorepo projects. We started our project few years before polylith emerged. But our case is something polylith-like. One root deps file with all aliases and dependencies to subprojects and one subproject (commons) with all external dependencies. Now I'm evaluating Calva for our new team members and trying to configure all connect sequences etc. The one thing that always we have to do before jack-in is select root deps.edn, it would be great to launch repl from any nested project without needing to focus on root file. Additionally we have several remote repl servers and configured I wish I could just set some flag (e.q. |
Let the user pick if there are more than one Changes the way we find the closest project root Not using node fs module at all Fixes #1254
Here's a VSIX addressing this issue. I took a slightly different, simpler, path than what I described above. The connect process now starts by figuring out possible project roots,. If there are more than one, it will present a menu where the user can pick. Then connect continues as before. See updated connect docs here: https://github.com/BetterThanTomorrow/calva/blob/1254-multiple-project-roots/docs/site/connect.md Even if simpler than what I first planed for, it is still a significant change. Please test it throughly. ❤️ |
This broke my connect sequence in my monorepo. Trying to create a minimal project to reproduce. |
Polylith repositories are monorepos where you are supposed to start one REPL to be able to develop and ”reach” all sub-projects, etcetera.
deps.edn
files are used to configure things on many levels, but there is seldom any use for starting separate REPLs for these.Today Calva only considers the regular monorepo case with separate projects and separate REPLs. So when jacking in to a project, Calva looks for the ”closest” (from the current directory and up to the repo/window/workspace root) project file (deps.edn, project.clj, shadow-cljs.edn) and presents a jack-in menu based in this file. This doesn't make sense for Polylith projects.
Generally, I think what makes sense is for Calva to ”collect” project files from the current file up to the repo/window/workspace root and present a menu where the user can select one of those. This makes sense regardless of if it is a monorepo or not and regardless if it is a regular monorepo or a Polylith project.
We could consider recognizing Polylith projects as well and give even more guidance, but that might be for a separate issue to request.
The text was updated successfully, but these errors were encountered: