Clojure-lsp: Find every test in the project by default at init to fulfill test tree managers

Created on 15 Jan 2022  路  3Comments  路  Source: clojure-lsp/clojure-lsp

Is your feature request related to a problem? Please describe.

As the new feature of test-tree for Calva was released it was noticeable that the test tree is only populated after open some files, and only with the tests from opened files.

Describe the solution you'd like

Maybe it would be great to do a quick scan in the project to detect every test after the initialization of clojure-lsp.

enhancement

Most helpful comment

Thanks, I think we should do that async to not block the startup time, after clojure-lsp initialized successfully, if you wanna give it a try you can check how we refresh clojuredocs, you can probably use the same approach here to add something like when not API:

(async/go
  (->> (f.test-tree/project-tree db)
        (map (producer/notify-test-tree (:producer @db)))))

otherwise, I can work on that during next week

All 3 comments

Thanks, I think we should do that async to not block the startup time, after clojure-lsp initialized successfully, if you wanna give it a try you can check how we refresh clojuredocs, you can probably use the same approach here to add something like when not API:

(async/go
  (->> (f.test-tree/project-tree db)
        (map (producer/notify-test-tree (:producer @db)))))

otherwise, I can work on that during next week

Done, available on next release, LMK if any issues!

Thanks Greg, amazing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NoahTheDuke picture NoahTheDuke  路  3Comments

andreyorst picture andreyorst  路  3Comments

bpringe picture bpringe  路  3Comments

leandropincini picture leandropincini  路  4Comments

alxdb picture alxdb  路  4Comments