Open arichiardi opened 8 years ago
Unfortunately Puget is not yet cross-compiled to ClojureScript. As of the 0.9.x series its main dependency (fipp) is cross-compiled though, so in theory this should be doable. I haven't worked a lot in cljs though, so if you have any suggestions I'm all ears.
Mainly I think this would involve making most of the files .cljc
and then adding reader conditionals around the Java-specific parts.
:+1: for this, also will have a look, regarding the java-handlers
i think we can drop it for cljs
will try to have something working.
yep agree, putting here as reference http://dev.clojure.org/display/design/Reader+Conditionals
Yeah, some thoughts:
dispatch/symbolic-reader
since it's not very useful standalone.dispatch/inheritance-lookup
is going to need to be reworked, but would be nice if the contract held across both clj and cljs. Now that I think about it, I don't even know how inheritance works in cljs. :disappointed: sys-id
and class name for unknown rendering is currently Java-specific.java-handlers
need to be dropped. We should support the #inst
tag for js Dates though.clojure-handlers
and clojure-interface-handlers
will probably need to be reworked a bit.Yes I notice arrangement
, but as you said, there are a few lines of code to change in there. I am more curious about sys-id
, what is the purpose? Skimming the code it looks like you're using it as id string in the span
creation. It looks that in that when
you check it against the class name...is it used for uniquely identify an instance?
The sys-id
used to differentiate otherwise-identical instances of the same class. For Clojure's persistent collections and other EDN primitives, this is not necessary since they support value-based equality. However, if you want to tell two instances of ByteArrayInputStream
(for example) from each other, you need to use the system-level hash-code. Hence the use in the unknown formatter.
The package.foo.Bar@123abc
format is used by Java as the default toString
implementation, so the formatter checks that it's not going to print the same thing twice in case the object doesn't implement a custom string format.
Yes I suspected that.
I am going to begin work on this.
@venantius great! Feel free to ping me here or on Slack for testing!
Cool, I've just started picking up Clojurescript myself! I've experimented a bit with cross-compiling in alphabase and it's pretty nice so far.
Reference WIP PR here: https://github.com/greglook/puget/pull/30
hey, any movement on the CLJS support? looks like the upstream PR in clj-arrangement was merged, anything blocking this?
Nothing blocking it other than time. I've made a bunch of progress since the last comment on this issue, but I haven't had a chance to drag it over the line. I'd say the current status is about 80% done.
Hello. What's left to do here? Would be nice to finally finish this :)
Hello, just looking for some news, what's up on that issue? If you don't have time to finish it, do you think you could still write what's left for others to try to help you?
There's been no progress. Anyone interested in picking this up should refer to the WIP PR referenced above for Puget, or could take a look at the syntax-highlighting engine for Planck and work on it from that angle.
@venantius Could you be so kind and describe what is it that needs to be done, i.e. what are the main problems that need to be solved? It is not very clear to me from the PR (the comments there are too low-level for me) or from the " look at the syntax-highlighting engine for Planck and work on it from that angle". I think it would be very helpful to provide a clear description of the task (and the work done so far) so that somebody can pick it up. Thank you!
Hello guys, I am trying to include the new puget
0.9.2
in a ClojureScript project with no luck. I tried to downgrade to0.8.1
but still I am not able to see puget in my classpath. It always throws the classicno namespace found printer.puger...bla bla .cjlc ...bla
My
project.clj
:The
profile.clj
is empty.Very weird, what can it be? Does puget modify the classpath at all?