Skip to content

Conversation

@alexandergunnarson
Copy link

@alexandergunnarson alexandergunnarson commented Jul 27, 2016

  • All tests pass, both CLJ and CLJS.
  • However, do check the (very few) things marked “FIXME” and address
    them as you see fit. They involve eval (CLJ only), a reflection test
    (CLJ only), a cljs.test multimethod which is only available from CLJ,
    and platform-specific stack traces in CLJS. None of these things alter
    the functionality of Slingshot.
  • Also, in order to support CLJC, I had to drop support for Clojure 1.4-1.6. If this is a problem, I’m sure we can do .cljx (even though it’s a pain).

To those who want this PR on clojars, it's available as [alexandergunnarson/slingshot "0.14"].

- Tests do not pass yet because .clj, not .cljc
- All tests now pass, both CLJ and CLJS.
- However, do check the (very few) things marked “FIXME” and address
them as you see fit. They involve `eval` (CLJ only), a reflection test
(CLJ only), a cljs.test multimethod which is only available from CLJ,
and platform-specific stack traces in CLJS. None of these things alter
the functionality of Slingshot.
- In order to do this, had to drop 1.4, 1.5, 1.6 support. We keep 1.7
and 1.8 support. .cljx is an option if we need to have 1.4-1.6 support
still.
@alexandergunnarson alexandergunnarson changed the title Release CLJS support! Jul 27, 2016
@alexandergunnarson alexandergunnarson changed the title CLJS support! We have CLJS support! Jul 27, 2016
This fixes something that appeared when I tried to use the CLJS version
of Slingshot in a project — namely, that slingshot.support referring to
its own macro apparently sometimes causes a problem (though it doesn’t
always). Thus, the offending macros have been moved to slingshot.util.
@atroche
Copy link

atroche commented Sep 25, 2016

Hi @scgilardi, did you ever get a chance to look this over? Do you think it's a good idea?

@alexandergunnarson
Copy link
Author

@atroche @mattly @duck1123 This is available on Clojars as [alexandergunnarson/slingshot "0.14"] if you'd like it.

@metametadata
Copy link

metametadata commented Jun 20, 2017

  1. It looks like it can't catch all CLJS exceptions via (catch :default e). It can be related to Catching all exceptions: unexpected behavior #24.

  2. It doesn't recognise ExceptionInfos as js/Errors (but built-in try does recognise it):

(try+
  (throw (ex-info "foobar" {}))
  (catch js/Error e
    (println "foobar caught")) ; <------------- is not printed

@scgilardi
Copy link
Owner

Looks interesting! I'll go over it in more detail and write again.

@velios
Copy link

velios commented Jan 11, 2024

@scgilardi Much time has passed since then. Apparently we won't see this functionality anymore.

@seancorfield
Copy link

Future work on this will happen here clj-commons#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants