Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Benedek Fazekas
@benedekfazekas
as much as i understand end-line and end-column are the coordinates where the form in question ends
most of the cases they will end in the same line where they started but not always.
Julien Fantin
@julienfantin
I think for top-level forms it's a bit more tricky since they're more likely to span multiple lines.
One thing I need to check is whether the state of the form on file can be retrieved from the ast, e.g. if a form has trailing parens on individual lines, my guess is the ast will normalize that code to pr-str version of it, hence obfuscating the actual number of lines the form takes up on file
david nolen mentionned that there's no particular reason why that data is missing from the ast and that it should be added, so that's also an option...
Benedek Fazekas
@benedekfazekas
hm.. as far as i remember this info comes from the reader more precisely clojure.tools.reader.reader-types/indexing-push-back-reader
Lars Andersen
@expez
You want to hold off on dropping s.el for 2.3.0 @benedekfazekas?
Benedek Fazekas
@benedekfazekas
don't wanna rush it or introduce regressions
as there are plenty of things in 2.3.0 already
any reasons it should rather go into 2.3.0?
i deffo want to include clojure-emacs/refactor-nrepl#169 tho
and might have a quick look on some smaller issues (no definite list yet)
Lars Andersen
@expez
Aight
Sounds good
Julien Fantin
@julienfantin
The cljs analysis story is a bit bumpy, I just managed to get end-line and end-column into the env but that requires a patch to the cljs analyzer as well as a patch to jvm.tools.analyzer to use the indexing reader, will try to submit those.
Though we could do without jvm.tools.analyzer entirely since it's only using a single function to analyze-ns which is 15 lines
Benedek Fazekas
@benedekfazekas
hm... if there is no real added value perhaps not using it is the better option
Jon Pither
@jonpither
hi all
Clean namespace declaration keeps removing stuff from here that I need: (:import [com.google.protobuf Descriptors Descriptors$Descriptor Descriptors$FileDescriptor Descriptors$FieldDescriptor$JavaType]
java.util.Base64)
in particular Descriptors$Descriptor Descriptors$FileDescriptor
Lars Andersen
@expez
Yeah, this is a known bug :/
Jon Pither
@jonpither
cool
thanks
Benedek Fazekas
@benedekfazekas
pushed a fix for this. currently waiting for travis to wake up (perhaps the github outage affecting them?!). after a succ travis build will push a new version of the snapshot build to clojars
Lars Andersen
@expez
@benedekfazekas We ready for 2.3.1?
Great work lately ! :+1:
Benedek Fazekas
@benedekfazekas
Ooo i released it 9 days ago
did an ANN on the clojure mailing list
Lars Andersen
@expez
aha, I was travelling at the time and missed it. Awesome! :smile:
Arne Brasseur
@plexus
hi folks!
Anyone seen behavior where clj-refactor causes namespaces to load automatically on repl start?
I had to disable it because it's really messing up my workflow, but I didn't find an issue related to this so maybe it's something particular to my setup. Any idea what could be causing this?
Benedek Fazekas
@benedekfazekas
yup, this is know behaviour. the analyzer we use (tools.analyzer.jvm) evals the code in order to be able to analyze it
there are a few config options to opt out if you prefer
opting out also means tho that certain (the more interesting) features won't work
Mikey Reilly
@mikeyreilly0_twitter
I'm using clojure-maven-plugin. When I do a cider-connect I get this "WARNING: clj-refactor and refactor-nrepl are out of sync. Their versions are 2.4.0-SNAPSHOT (package: 20171117.317) and n/a, respectively." Is there anything I can do to my pom.xml to make this warning go away? I've tried adding refactor-nrepl 2.4.0-SNAPSHOT as a dependency.
Lars Andersen
@expez
@mikeyreilly0_twitter the middleware for clj-refactor isn't being started, so there's no reply when clj-refactor sends messages that way
Short of using lein or boot there isn't much to be done about that
Well, you could leave clj-refactor off. Almost all the stuff that works without a middleware has been moved over to clojure-mode, so you won't lose much functionality of you do that
My recommendation would be to use something other than clojure-maven-plugin. It looks like abandonware to me.
Mikey Reilly
@mikeyreilly0_twitter
@expez Thanks for your help. I know I wouldn't have this problem with lein or boot. The reason I'm stuck with maven is that I've started a new job in a java house and I'm trying to sneak a little clojure through the back door. Adding some clojure stuff while continuing to use maven is not as disruptive as getting folks to agree to using new build tools would be. In fairness to clojure-maven-plugin, I've managed to get it to do everything I need. It's just that this warning is irksome. Your advice encourages me to put up with it and not waste more time trying to discover a remedy.
Lars Andersen
@expez
@mikeyreilly0_twitter You can try this branch: clojure-emacs/clj-refactor.el#392
Just remembered that someone else had the same problem
Jeaye Wilkerson
@jeaye
I'm looking to just run the refactoring logic available from my repl. I'm not using emacs, the one vim plugin for refactor-nrepl doesn't work (and is >1 year stale), and editor integration doesn't matter to me. I've tried following the readme and using something like (with-open [conn (repl/connect :port 36607)] (-> (repl/client conn 1000) (repl/message {:op :version}) repl/response-values)) but that doesn't seem to be the complete picture. Any help would be great.
Lars Andersen
@expez
@jeaye Just call the refactoring functions directly
You can see how that is done in the middleware namespace
There is some lazy-loading extras in that namespace, but it should be pretty clear how it works
Jeaye Wilkerson
@jeaye
@expez I'll give that a shot. Thank you.