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

Make it possible to associate a project folder with any connection #1217

Closed
bbatsov opened this issue Jul 19, 2015 · 4 comments
Closed

Make it possible to associate a project folder with any connection #1217

bbatsov opened this issue Jul 19, 2015 · 4 comments

Comments

@bbatsov
Copy link
Member

bbatsov commented Jul 19, 2015

Right now our primitive algorithm that matches local project directories to nREPL connections is pretty limited. It works only for connections that were started using cider-jack-in, because it maps a project dir to a connection at boot time. It also cannot handle very well situations when several projects are mapped to the same connection. All this makes it hard to work with several connections, as often you have to switch manually between them.

One way to improve this is to able to associate a project directory with any connection, using an interactive command, you can invoke at any time. That is simple solution that would solve the bigger part of this issue. In rare cases when some project is mapped to two connections we can opt to dispatch to the default connection (meaning business as usual). //cc @Malabarba

@Malabarba
Copy link
Member

One way to improve this is to able to associate a project directory with any connection, using an interactive command, you can invoke at any time. That is simple solution that would solve the bigger part of this issue.

Yes, this seems most sane. Also, when you first cider-connect, associate whatever project you happen to be in at the time with that connection.

A more sophisticated option would be to let users name the connections somehow. This is the tricky part.
Once that is done, users could permanently specify which connection a project is associated to by setting a cider-connection-name variable in the .dir-locals file, and all we'd have to do is check the value of that variable when evaluating stuff.

@bbatsov
Copy link
Member Author

bbatsov commented Aug 9, 2015

A more sophisticated option would be to let users name the connections somehow. This is the tricky part.

There's already functionality to rename connections, btw. I think that setting this on boot won't be that hard either.

bbatsov added a commit that referenced this issue Aug 10, 2015
This command should mostly be used with connections created using
`cider-connect`.
@bbatsov
Copy link
Member Author

bbatsov commented Aug 17, 2015

So, the bulk of the work regarding is done. The only outstanding tasks are:

  • support for nested projects
  • improving the handling of multiple matching projects - although I'm not sure what's the best course of action here

@bbatsov
Copy link
Member Author

bbatsov commented Oct 11, 2015

I think this works more or less well in it's present form, so I'll close this issue.

@bbatsov bbatsov closed this as completed Oct 11, 2015
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