Closed conan closed 5 years ago
Autocomplete also does the same thing; if I type conan.egg/y
and autocomplete in the conan.omelette
namespace, it will autocomplete to ::yolk
, which doesn't resolve in that namespace. Seems like all of this could be fixed by avoiding the shorthand altogether.
I can't reproduce this - this definitely should work correctly. When I do the first rename the keyword in egg
becomes ::yolk
as you see, but the one in the omelette namespace becomes ::egg/yolk
. Autocomplete similarly shows ::egg/yolk
in the omelette namespace and ::yolk
in the egg one.
It's possible your indexes have become corrupted - does "File->Invalidate caches and restart" help this?
Ugh, yes it seems to be behaving itself after invalidating caches, sorry.
Say I have two namespaces,
conan.egg
andconan.omelette
, and the second depends on the first.Now I want to simplify things by renaming the spec for yolk from
:conan.egg.parts/yolk
to:conan.egg/yolk
, so I do a Refactor > Rename, and type in:conan.egg/yolk
into the rename dialogue, and confirm the refactor.This renames the spec in the egg namespace to
::yolk
, which is annoying as that's not what i typed, but at least it will work; but it does the same thing in the omelette namespace, which won't work. It ends up looking like this:That
::yolk
spec is shorthand for:conan.omelette/yolk
, which doesn't exist.As a result it isn't safe to use Refactor to rename specs to have namespaces which match their current Clojure namespace, and in practice I find it's easier just not to think about it and assume it's not safe ever to use Refactor to rename specs.