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

Regression with Reagent macros in 0.5.0 #28

Closed
danielcompton opened this issue Mar 25, 2019 · 2 comments
Closed

Regression with Reagent macros in 0.5.0 #28

danielcompton opened this issue Mar 25, 2019 · 2 comments

Comments

@danielcompton
Copy link

danielcompton commented Mar 25, 2019

Previously, mranderson rewrote https://github.com/reagent-project/reagent/blob/master/src/reagent/debug.clj#L7 from

(defmacro log
  "Print with console.log, if it exists."
  [& forms]
  `(when reagent.debug.has-console
     (.log js/console ~@forms)))

;; to

(defmacro log
  "Print with console.log, if it exists."
  [& forms]
  `(when mranderson048.reagent.v0v8v0.reagent.debug.has-console
     (.log js/console ~@forms)))

When using mranderson 0.5.0, the namespace form isn't rewritten, it stays exactly the same as the original.

Looking at the form, it is valid ClojureScript, though it may be more idiomatic to write reagent.debug/has-console.

I've noticed improvements elsewhere, "Expected a reagent component, not "
used to be rewritten to "Expected a mranderson048.reagent.v0v8v0.reagent component, not ", but is now left alone. I suspect this bug may be a side-effect of the change.

danielcompton added a commit to day8/re-frame-10x that referenced this issue Mar 26, 2019
Make the source-deps script more robust.
- Delete all META-INF directories
- Delete any remaining empty directories
- Create a gen-src directory for all generated source so we can rm it
  independently of the src

Set a day8.re-frame-10x.inlined-deps prefix for all inlined
dependencies. This makes it clearer where the dependencies are coming
from in debugging situations.

While upgrading I had to manually rewrite reagent debug macros until
benedekfazekas/mranderson#28 is fixed.

Fixes #235
@benedekfazekas
Copy link
Owner

the latest 0.5.1-SNAPSHOT on clojars is an alpha for 0.5.1 please check it out if it fixes this problem and works on your project

@danielcompton
Copy link
Author

Yep, this works!

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

No branches or pull requests

2 participants