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

Migrate from cljx to cljc. #288

Closed
wants to merge 2 commits into from
Closed

Conversation

anthonygalea
Copy link

Started migrating manually, then wrote this: https://github.com/anthonygalea/cljx/blob/master/cljx.el#L31

The only thing I corrected by hand was changing to the splicing conditional around the ^boolean type hint. i.e. after the script ran I rewrote:

#?(:cljs ^boolean) may-log?

to:

#?@(:cljs ^boolean may-log?)

Not sure how you usually go about testing. Tried a couple of calls and I see the same behaviour I see with 4.10.0:

(ns playground.timbre
  (:require [taoensso.timbre :as timbre
             :refer [log  trace  debug  info  warn  error  fatal  report
                     logf tracef debugf infof warnf errorf fatalf reportf
                     spy get-env]]))

(info "This will print")

(spy :info (* 5 4 3 2 1))

(defn my-mult [x y]
  (info "Lexical env:" (get-env))
  (* x y))

(my-mult 4 8)

@anthonygalea
Copy link
Author

After adding support for type hints I realised the manual rewriting I did was wrong. Corrected it to: #?@(:cljs (^boolean may-log?))

@ptaoussanis
Copy link
Member

Thanks Anthony, this looks good! Will use this in a future release.

@ptaoussanis
Copy link
Member

Merged manually, thanks again Anthony!

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

Successfully merging this pull request may close these issues.

2 participants