Fork me on GitHub
#clojurescript
<
2016-06-20
>
vandr0iy00:06:06

hi, clojure-scripters! I need some help with reagent - it does not start correctly.

vandr0iy00:06:08

basically, I create new https://github.com/reagent-project/reagent-frontend-template reagent frontend project, and when I state lein figwheel in my terminal in order to start it for the first time it does not, even if the messages shown in my terminal show no warnings/errors/anything - just hanging on this:

Prompt will show when Figwheel connects to your application
. When I go to localhost:3449 it states: _Figwheel Server: Resource not found Keep on figwheelin'_

cfleming00:06:53

When using implicit macro loading (described here: https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#namespaces), does the :refer option also implicitly refer macros?

cfleming00:06:43

i.e. can I do (ns my-ns (:require [other-ns :refer [some-fn some-macro]]))?

cfleming00:06:56

Where other_ns.clj defines some-macro and other_ns.cljs defines some-fn

darwin00:06:16

@vandr0iy: I just tested it here on my machine and I confirm that it does not work, behaves like you describe

vandr0iy00:06:00

@darwin: does it work with any other reagent template?

darwin00:06:56

I moved their public folder under newly created resources and commented out their extra config overriding resource locations and it works

dnolen01:06:04

there’s a ticket for that, but as of yet not implemented

dnolen01:06:01

@gowder that warning is really an innocuous thing

dnolen01:06:35

still yeah, transit-cljs will get fixed early this week

gowder01:06:09

@dnolen: thanks! Yeah it's pretty innocuous

vandr0iy01:06:45

@darwin thanks for the suggestion, it worked for me too!

vandr0iy02:06:04

anyways, it is still freezing - as before, not showing the repl, and the browser spits a load of these warnings:

darwin02:06:48

@vandr0iy: I had to set all figwheel versions explicitely to 0.5.4-3

darwin02:06:03

figwheel was reporting mismatch between server and client version

darwin02:06:20

other than that it worked for me

vandr0iy02:06:59

ok, problem solved - I had a uMatrix filter set on localhost. My fault 🙂

dhucerbin09:06:40

Hi, I added dependencies to project.clj:

:dependencies [...
[reagent "0.6.0-rc"]
                 [posh "0.3.5"]
                 [datascript "0.13.3"]...
but when requiring them in my cljs file I get No such namespace: ... error. When running lein deps :tree I see those dependencies. What I miss?

crankyadmin09:06:34

Morning everyone. I'd like to use https://cloudflare.github.io/cf-ui/ in my project and can't work out how to get it loaded into ClojureScript. Any advice?

dhucerbin09:06:16

I will add that lein cljsbuild once compiles with success but cursive and fighweel reports missing namespaces

cfleming09:06:48

@dhucerbin: When you’ve added deps to Cursive, you need to refresh your lein dependencies. You can do that in View-&gt;Tool Windows-&gt;Leiningen and press the refresh button, or search for the action “Refresh Leiningen Projects" with Cmd-Shift-A

cfleming09:06:28

However if Figwheel is reporting problems too, your problem may be something else - that’s a Cursive specific fix.

Niki09:06:37

@dhucerbin: it’d be easier if you post full project.clj and full error stacktrace

dhucerbin09:06:06

Ok, cursive trick helped

dhucerbin09:06:17

but what is going on under the hood?

dhucerbin09:06:13

this is my project.clj

dhucerbin09:06:19

Oh, I see that in cursive I have now posh, reagent, datascript under 'externall libraries'

cfleming09:06:01

@dhucerbin: Right. Cursive needs to know which dependencies your project uses, and currently refreshing that list after updating your project.clj is manual.

cfleming09:06:10

I’m planning to improve that soon.

dhucerbin09:06:57

What about figwheel? It uses the same dep 'repository'?

dhucerbin09:06:52

(I'm primary js developer and I'm familiar with npm install and then I have my dependency in node_modules directory, It's there something like that?)

cfleming10:06:34

@dhucerbin: So Figwheel uses the dependencies from the project.clj, yes. But it doesn’t require them to be synced to IntelliJ, so the refresh step above won’t do anything for it. If you update your project.clj, you’ll need to restart Figwheel for it to pick those deps up, I believe.

cfleming10:06:00

But I’m no figwheel expert, there are bound to be people here who know much more than I do about it.

dhucerbin10:06:46

actually your tip about refreshing deps in cursive fixed figwheel also

dhucerbin10:06:56

or your tip forced figwheel to restart, I restarted it in repl panel only

wilkerlucio16:06:21

I belive I found an issue using int-in on Clojurescript 1.9.76, can someone else confirm that? any usage of cljs.spec/int-in is failing here with No such namespace: c, could not locate c.cljs, c.cljc, or Closure namespace ""

dnolen17:06:17

@wilkerlucio: can’t confirm at the moment but I would not be surprised

mfikes18:06:41

@wilkerlucio: Yes. Confirmed. We had to expand the c alias and this is a new instance of that. (simple changes like this https://github.com/clojure/clojurescript/commit/8477f19dcf67a8f305b46f2fd2e793586e027263)

dnolen18:06:50

@mfikes thanks fixing now

dnolen18:06:51

fixed in master