Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I have a problem when I use Calva's Jack In command - I have to run to open my project.clj file in the root of the repo before I Jack In. If I run the command when I have any source files open in the editor, the Jack In fails. The reason for this is that Calva will search from the directory containing the current file down to the workspace root. There are many projects named `project.clj` in the main CircleCI repo, since a project one of our core domain objects: ``` marc@blaster ~/dev/circleci/circle $ find . -name project.clj ./project.clj ./src/circle/project.clj ./src/circle/http/api/v1/v1_0/project.clj ./src/circle/http/api/v1/v1_1/project.clj ./src/circle/http/api/v1/shared/project.clj ./src/circle/http/api/v2/insights/project.clj ./src/circle/http/api/v2/project.clj ./src/circle/http/api/v2/entities/insights/project.clj ./src/circle/http/api/v2/entities/project.clj ./src/circle/model/project.clj ./src/circle/model/api/project.clj ``` If I have any file open in `src/circle`, (which is the location of all source files), Calva will find `src/circle/project.clj` before it considers the project.clj in the root. As far as I understand, this is a desirable search behaviour, since it allows folks to use Calva in projects that contain multiple leiningen projects. This change alters the search behaviour to only consider files that don't begin with the string `(ns ` when attempting the determine the project path. Fixes #871
- Loading branch information