-
Notifications
You must be signed in to change notification settings - Fork 14
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
:import
of records breaks
#14
Comments
give a try to just released 0.4.9 if still relevant |
This is still present in 0.5.0 in re-frame-10x when creating source dependencies for garden. |
can you point me to what exactly broke perhaps in your commit where you manually fixed this @danielcompton ? |
so allowing this when replacing occurances of old sym in body. Java style package with underscores has precedence when searching.
@benedekfazekas it looks like you've fixed this now, do you still need me to track it down? |
should be ok now, pls check with latest snapshot |
I'm still having issues with importing garden records. It looks like the namespace needs to be changed from dashes to underscores when importing the record. After running 0.5.1-SNAPSHOT against re-frame-10x (with The change I'm most concerned about is the import field. It would be nice to have strings and comments not rewritten, but that's not such a big deal. ;; Compiler flags
diff --git a/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/def.clj b/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/def.clj
index b97b484..4c490c8 100644
--- a/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/def.clj
+++ b/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/def.clj
@@ -2,8 +2,8 @@
(:require [day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types]
[day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.util :as util]
[day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.core])
- (:import day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.types.CSSFunction
- day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.types.CSSAtRule))
+ (:import day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types.CSSFunction
+ day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types.CSSAtRule))
(defmacro defstyles
"Convenience macro equivalent to `(def name (list styles*))`."
@@ -45,7 +45,7 @@
defcssfn
"Define a function for creating custom CSS functions. The generated
function will automatically create an instance of
- `garden.types.CSSFunction` of which the `:args` field will be set
+ `day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types.CSSFunction` of which the `:args` field will be set
to whatever the return value of the original function is. The
`:function` field will be set to `(str name)`.
@@ -57,10 +57,10 @@
;; => #'user/url
(url \"http://fonts.googleapis.com/css?family=Lato\")
- ;; => #garden.types.CSSFunction{:function \"url\", :args \"http://fonts.googleapis.com/css?family=Lato\"}
+ ;; => #day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types.CSSFunction{:function \"url\", :args \"http://fonts.googleapis.com/css?family=Lato\"}
(css (url \"http://fonts.googleapis.com/css?family=Lato\"))
- ;; => url(http://fonts.googleapis.com/css?family=Lato)
+ ;; => url(http://fonts.googleapis.com/css?family=Lato) |
new snapshot version with a proper fix is on clojars. please retest re. comments and strings: there was an interim version of 0.5.0-SNAPSHOT where I parsed the whole ns with |
This is getting pretty close, there seems to be one case remaining, again diff --git a/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/units.cljc b/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/units.cljc
index 4b28a28..3f8e280 100644
--- a/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/units.cljc
+++ b/gen-src/day8/re_frame_10x/inlined_deps/garden/v1v3v3/garden/units.cljc
@@ -6,14 +6,14 @@
[day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types :as types]
[day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.util :as util])
(:import
- (day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.types CSSUnit))])
+ [day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.types CSSUnit])])
#?@(:cljs
[(:require
[cljs.reader :refer [read-string]]
- [day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.types :as types :refer [CSSUnit]]
- [day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.util :as util])
+ [day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.types :as types :refer [CSSUnit]]
+ [day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.util :as util])
(:require-macros
- [day8.re-frame-10x.inlined-deps.garden.v1v3v3.garden.units :refer [defunit]])]))
+ [day8.re_frame_10x.inlined_deps.garden.v1v3v3.garden.units :refer [defunit]])]))
;;;; ## Unit families |
eh this is annoying, sorry. will have a look. |
after looking at this realised that this is a slightly different edge case here. not trying to explain away the bug but apparently ns macro for that said I suppose I need to handle the case where there are two |
new snapshot is on clojars. just to eat my words again the problem was not with the multiple requires but my yesterday's fix was buggy. hopefully this does it -- famous last words ;) |
Yep, looking good, can confirm this fixes it. Thanks! |
nice one! thanks for the patience :) does this mean you can get rid of the patching step in your workflow? |
Yep, it’s all 100% automatic now. |
I'm happy that this was fixed, many thanks! I'll give it another go next time I work on positano (which could be a while!) |
@stathissideris let me know what you find when you get there, cheers |
I have the following
project.clj
Running the tests with mranderson, results in this exception:
PullSpec
is a record defined in a different namespace of datascript:https://github.com/tonsky/datascript/blob/master/src/datascript/pull_parser.cljc
You can try my project here:
https://github.com/stathissideris/positano
The text was updated successfully, but these errors were encountered: