rewrite-clj

https://github.com/clj-commons/rewrite-clj
lread 2019-11-17T16:56:24.242200Z

hmm... maybe ask.clojure would be a good place to pose the question.

2019-11-17T18:44:11.248200Z

it seems like the general question of what might be done in these types of situations might make it on-topic for #clojure. in theory i think ask.clojure might not be a bad place, though i wonder how many relevant folks check it as it's still somewhat new. still, some relevant folks might check it. possibly asking at more than one place might be ok as well? although it's kind of on the quiet side, there is a #tooling on zulip -- some relevant people might read that.

lread 2019-11-17T20:23:17.252400Z

@sogaiu, I was writing out my question for #clojure, when I realized I like @borkdude's 2 cts here. I think having to rename namespaces to rewrite-cljc in one's project to use rewrite-cljc is much less of a burden than the burden of the confusion of introducing colliding namespaces into the community.

2019-11-17T20:25:32.254Z

yes, that may be so. still think it couldn't hurt to hear what some folks on #clojure might have to say 🙂

2019-11-17T20:35:13.255100Z

(on a side note, by asking in some area like #clojure, i think it may have the side-effect of helping to let some interested folks know of the rewrite-cljc effort and status.)

borkdude 2019-11-17T20:46:31.256300Z

rewrite-cljc is potentially a breaking version, even if it's not intended. at least you can afford yourself that luxury. that's why think renaming is the safer option. also less confusion.

lread 2019-11-17T21:03:12.258Z

good points, thanks you two!

lread 2019-11-17T21:03:29.258400Z

I'll share my decision on #clojure for a reaction.

2019-11-17T23:11:54.268800Z

on a related note, this past year or so i've started to want the ability to use a library in a renamed fashion to have it not conflict with other deps. not just in clojure. at the moment, the renaming part seems painful - also trying to apply updates. i wonder if there is a programming lang with support for this sort of scenario - i.e. so it's not such a manual process.

borkdude 2019-11-17T23:12:42.269200Z

The library I've used to "vendor" rewrite-clj for clj-kondo is: https://github.com/benedekfazekas/mranderson

2019-11-17T23:13:39.270500Z

i saw mr. anderson being used for nrepl, i think. did you find it to work well?

borkdude 2019-11-17T23:15:06.271300Z

these are my notes about it:

* Inlined deps
** project.clj
(defproject proj "0.0.1-SNAPSHOT"
  :dependencies [[org.clojure/clojure "RELEASE"]
                 ^:inline-dep [rewrite-clj "0.6.1"]]
  :plugins [[thomasa/mranderson "0.5.1"]]
  :mranderson {:watermark :no-doc})

** lein command
lein inline-deps :project-prefix clj-kondo.impl

borkdude 2019-11-17T23:15:39.271900Z

that's basically all I know about it and how I used it

2019-11-17T23:16:12.273Z

ah, thanks! i wonder if i can get it working w/o lein...guess i'll investigate :)

borkdude 2019-11-17T23:16:33.273500Z

it copies stuff to the target directory, so you can copy that over to your project, then you can use whatever build tool you want from that point on

2019-11-17T23:18:23.275800Z

ok, that sounds pretty reasonable. it seems like it has worked out for you, so that's another good sign :) the other place i have wanted this is emacs. may be i will ask on #emacs.

borkdude 2019-11-17T23:18:48.276Z

ok, afk now

2019-11-17T23:18:55.276200Z

tnx!