Skip to content

Also match friendly sessions based on the buffer's ns #3419

@vemv

Description

@vemv

Cider's sesman 'friendly session' calculation is based on the buffer filename.

But we can also observe the buffer's ns form.

This allows us to match copies of files that are in the classpath.

For instance:

  • foo.clj (with a specifc file/jar prefix) is in the classpath
  • the current buffer's filename does not belong to the classpath
  • but the current buffer ns name (foo) matches with that of the file that does belong to the classpath.

This way, we avoid 'No linked session' errors, for certain cases.

This approach is a little lax, since a given copy of a ns might be different to the original, but most times it doesn't matter - all that we want is a valid Clojure connection.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions