Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We have CLJS support! #56

Open
wants to merge 8 commits into
base: release
Choose a base branch
from

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.

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.

5 participants