Skip to content

Namespaced keyword "Navigate to Declaration" and "Find Usages" do not work outside of CLJC files #1913

@shaunparker

Description

@shaunparker

Clojure Spec definitions defined in CLJC files do not work with "Navigate to Declaration" or "Find Usages" in CLJ and CLJS files.

Steps to reproduce:

  1. Create specs.cljc
(ns specs
  (:require [clojure.spec.alpha :as s]))

(s/def ::name string?)

(def the-best-person
  {::name "Jane"})
  1. Create example.clj
(ns example
  (:require [specs :as specs]))

(def people
  [{::specs/name "John"}
   {::specs/name "Jane"}])
  1. From example.clj navigating to the ::specs/name declaration doesn't work. Viewing the usage only shows the two usages in the example namespace.

screenshot 2017-12-06 15 32 55

  1. From specs.cljc file, navigating to the ::name declaration works, but finding usages only shows the usage in the CLJC file, not the two in example.clj.

screenshot 2017-12-06 15 33 56

  1. Convert specs.cljc to CLJ.

  2. "Navigate to Declaration" and "Find Usages" work properly.

screenshot 2017-12-06 15 37 15

screenshot 2017-12-06 15 36 42

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugMarks issues describing bugsreleasedMarks issues which have had the fixes released in a stable build

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions