by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Lars Andersen
@expez
But I just get Invalid token: ::set/foo when I try to run the tests.
It doesn't even get to the part where it tries to do any work, it fails on startup basically
I don't understand why the clojure reader is acting in this manner. It should just be like "Oh, this is the cljs part, let me just ship ahead..." but instead it tries to resolve the set alias so it can read the keyword properly

I'm pretty sure the only thing needed to be done is to change the variable ns-aliases in the symbols-in-file function to be this:

           ns-aliases (if ((#{:cljc :cljs}) dialect)
                        (ns-parser/aliases
                         (ns-parser/get-libspecs-from-file dialect (io/file path)))
                        (ns-aliases file-ns))]

but I couldn't try that out due to the problem above

Henry John Kupty
@hkupty
Hi! I'm having a bit of a problem with bencoded maps with keywords for refactor-nrepl 2.3.0-SNAPSHOT.
They're being returned as keyworded strings, such as ":keyword"
I'm pretty sure this line should be something like (->> v name (conj [] (namespace v)) (filter some?) (interpose "/") (apply str)), which is safe for both keywords and symbols and returns a namespaced string as well...
Or, if that is the intended behavior (which is fine for me), that should probably be documented.
Anyway, Thanks in advance for all the help.
Cheers and a happy new year!
Benedek Fazekas
@benedekfazekas
oi @expez sorry. seen your comment yesterday but having an eye infection so can't really look at things (literally)
Lars Andersen
@expez
Ouch, that sucks @benedekfazekas. Feel better!
@hkupty Yeah, that's definitely not how it's supposed to work. I forgot that str doesn't really do what we want here. I've deployed another snapshot with this fix: clojure-emacs/refactor-nrepl@56a1c67
Henry John Kupty
@hkupty
@expez That works perfectly! Thanks !
Benedek Fazekas
@benedekfazekas
oi @expez still stuck with the above? is there a related issue on github?
Lars Andersen
@expez
@benedekfazekas Yeah, the issue I'm trying to solve is this one: clojure-emacs/refactor-nrepl#175
Lars Andersen
@expez
Reading the code now the approach seems wrong to me. The dialect is passed in as clj and cljs in order to deal with cljc files.

Nonetheless, when I tried this I couldn't even load the file. When the following code:

#?(:cljs ::set/foo
   :clj ::inst/bar)

Was dispatched to the cljs repl it blew up with the invalid token exception too, even though the alias existed

Benedek Fazekas
@benedekfazekas
@expez probably a silly question, but does ::set/foo make sense? if setprefix refers to a namespace then it should be :set/foo right? double colon is a shortcut to create keyword in current ns, or?
Lars Andersen
@expez
You are right ofc, not sure why I didn't see that at the time
Think I got confused because the clj reader accepted it, but the cljs reader did not heh
Benedek Fazekas
@benedekfazekas
haha no worries
nothing blocks the release then?
Lars Andersen
@expez
No, just gotta find a slot of time to fix that one
Lars Andersen
@expez
Actually can't reproduce it
seems to be working just fine
I can reproduce in 1.7 but not in 1.9
shiiiiit
Lars Andersen
@expez
so our current code works just fine in 1.9, but not in 1.7 (I tested this upgrading both clj and cljs to 1.9)
I'll dig into that another day
Benedek Fazekas
@benedekfazekas
coolio. no rush
Lars Andersen
@expez
:)
Benedek Fazekas
@benedekfazekas
never tried lispy tho.. i might
Benedek Fazekas
@benedekfazekas
@rxx
@expez I will have a proper look on #184 today and then merge. any objections?
Lars Andersen
@expez
sounds good to me
I don't think we should worry about staying close to slamhound (to make backporting easier) that project hasn't seen any activity for a long time
Benedek Fazekas
@benedekfazekas
yup. agreed
Lars Andersen
@expez
Thought about it when he wanted to change some of the code just because it used a style from 2008 :p
it makes my eyes hurt too, so I think it's fine lol
Arne Brasseur
@plexus
:wave:
Arne Brasseur
@plexus
just looking over some of the recent history here,
does ::set/foo make sense? if setprefix refers to a namespace then it should be :set/foo right? double colon is a shortcut to create keyword in current ns, or?
I may be missing some context here, but you can use ::foo/bar when foo is a namespace alias, e.g. (require '[hello-world :as foo]), then ::foo/bar is the same as :hello-world/bar
thanks for all the quick merges!
Lars Andersen
@expez
@plexus Does cljs support it, though?
Lars Andersen
@expez
Let me try with the updated reader
Invalid token: ::set/foo
bleh