Fork me on GitHub

hello, I'm having an issue to compile on a project, it sudenly start to fail to compile Fulcro:


File: jar:file:/Users/wilkerlucio/.m2/repository/fulcrologic/fulcro/2.6.0/fulcro-2.6.0.jar!/fulcro/client/primitives.cljc
failed to require macro-ns "fulcro.client.primitives", it was required by "fulcro.client.primitives"
{:tag, :macro-ns fulcro.client.primitives, :ns-info {:rename-macros nil, :renames {}, :meta {:file "fulcro/client/primitives.cljc", :line 1, :column 5, :end-line 1, :end-column 29}, :ns-aliases {clojure.core.async cljs.core.async, clojure.stacktrace cljs.stacktrace, clojure.spec.alpha cljs.spec.alpha}, :use-macros nil, :excludes #{var? key replace force}, :name fulcro.client.primitives, :op :ns, :env {:ns {:name cljs.user}, :context :statement, :locals {}, :fn-scope [], :js-globals {console {:name console}, location {:name location}, escape {:name escape}, screen {:name screen}, global {:name global}, process {:name process}, require {:name require}, alert {:name alert}, history {:name history}, window {:name window}, module {:name module}, exports {:name exports}, document {:name document}, navigator {:name navigator}, unescape {:name unescape}}, :line 1, :column 1}, :imports nil, :requires {t cognitect.transit, set clojure.set, clojure.spec.alpha cljs.spec.alpha, gstring goog.string, log fulcro.logging, targeting, fulcro.transit fulcro.transit,, p fulcro.client.impl.protocols, fulcro.client.impl.parser fulcro.client.impl.parser, fulcro.logging fulcro.logging, goog.string goog.string, async cljs.core.async, cljs.core cljs.core, gobj goog.object, goog goog, goog.object goog.object, fulcro.tempid fulcro.tempid, cljsjs.react cljsjs.react, cljs.core.async cljs.core.async, fulcro-css.css-implementation fulcro-css.css-implementation, fulcro.util fulcro.util, cognitect.transit cognitect.transit, hist fulcro.history, clojure.set clojure.set, clojure.core.async cljs.core.async, util fulcro.util, s cljs.spec.alpha, parser fulcro.client.impl.parser, fulcro-css.css-protocols fulcro-css.css-protocols, transit fulcro.transit, str clojure.string, zip, clojure.string clojure.string, cljs.spec.alpha cljs.spec.alpha, clojure.walk clojure.walk, tempid fulcro.tempid,, fulcro.history fulcro.history, fulcro.client.impl.protocols fulcro.client.impl.protocols}, :seen #{:require :require-macros}, :uses {prewalk clojure.walk}, :require-macros {fulcro.client.primitives fulcro.client.primitives, cljs.core cljs.core}, :form (ns fulcro.client.primitives (:require-macros fulcro.client.primitives) (:refer-clojure :exclude [var? key replace force]) (:require [goog.string :as gstring] [cljsjs.react] [goog.object :as gobj] fulcro-css.css-protocols fulcro-css.css-implementation [clojure.core.async :as async] [clojure.set :as set] [fulcro.history :as hist] [fulcro.logging :as log] [fulcro.tempid :as tempid] [fulcro.transit :as transit] [ :as zip] [ :as targeting] [fulcro.client.impl.protocols :as p] [fulcro.client.impl.parser :as parser] [fulcro.util :as util] [clojure.walk :refer [prewalk]] [clojure.string :as str] [clojure.spec.alpha :as s] [cognitect.transit :as t])), :flags {:require-macros #{}, :require #{}}, :js-deps {}, :deps [goog cljs.core goog.string cljsjs.react goog.object fulcro-css.css-protocols fulcro-css.css-implementation cljs.core.async clojure.set fulcro.history fulcro.logging fulcro.tempid fulcro.transit fulcro.client.impl.protocols fulcro.client.impl.parser fulcro.util clojure.walk clojure.string cljs.spec.alpha cognitect.transit]}}
ExceptionInfo: failed to require macro-ns "fulcro.client.primitives", it was required by "fulcro.client.primitives"


I have another project with very similar deps (same fulcro version) that compiles fine with the same shadow-cljs version (2.6.4)


tried cleaning .shadow-cljs, but I can't seem to figure how to get this project to compile again


is there anything else I can cache clear to get it back?


@wilkerlucio strange. try shadow-cljs clj-repl and then (require 'fulcro.client.primitives)


wonder why it fails to load?


man can i just say how much i love shadow-cljs @thheller

❤️ 8

recently discovered the report functionality, and that has been awesome


our entire (small) team of ~6 developers is absolutely loving it too. everyday i’m getting small anecdotes about how much better it is to work with


lovely feedback. thx. 🙂


@thheller just tried, I got this:


Wilker-Nu:fulcro-inspect wilkerlucio$ shadow-cljs clj-repl
shadow-cljs - config: /Users/wilkerlucio/Development/third-part/fulcro-inspect/shadow-cljs.edn  cli version: 2.6.4  node: v8.11.2
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - starting ...
	Aug 31, 2018 8:22:29 AM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Aug 31, 2018 8:22:29 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
shadow-cljs - HTTP server for :devcards available at 
shadow-cljs - HTTP server for :test-dev available at 
shadow-cljs - server version: 2.6.4
shadow-cljs - server running at 
shadow-cljs - socket REPL running on port 61362
shadow-cljs - nREPL server started on port 63104
shadow-cljs - REPL - see (help)
To quit, type: :repl/quit
[1:0]~shadow.user=> (require 'fulcro.client.primitives)
CompilerException Could not locate clojure/future__init.class or clojure/future.clj on classpath., compiling:(fulcro/history.cljc:1:1)


yeah sorry about that. that is fixed in the version I'm just about to release


got a bit overeager with the dependency filtering


I wonder why it works on other projects :thinking_face:


maybe using lein/deps?


yeah, doing that 🙂


yeah the shadow-cljs launcher thingy just filtered too much


didn't think we need clojure-future-spec due to always being 1.9


but seems like it has a special namespace


just pushed 2.6.5. should be fixed there.


just tested and compiled fine, thanks!


Is it possible to use different :source-paths for different builds? I am thinking about that in context of /checkouts to develop a library. I would like to run app with my checkouts version and with public version.


well you can use deps.edn or project.clj then yes but not with shadow-cljs itself


I have a project that uses a deps :local/root to point to a dep, this dep has some code that contains warnings and shadow is preventing code reload, shouldn't it ignore warnings outside the source paths?


also, in this point, the code I'm talking about is related to some macro-magic, and I think in the way it works it's impossible to avoid the warnings... would be possible to mark some part of the code as "I know this looks weird" so it ignores warnings on that block?


because while working on it at dev time those warnings are big PITA


hmmm I've noticed that when I start the shadow repl in emacs when using a deps.edn with aliases because the command to start shadow doesn't specify the alias like -A:dev some dependencies don't load


you can specify what aliases to use when you jack-in with clojure cli tools


@U4YGF4NGM Sorry long post alert


I never got a chance to pick aliases. Here's my process: hmmm how? Here are my steps depending on which command I use either clojure-cli or shadow-cljs 1. M-x cider-jack-in-cljs 2. [Prompt] Which command should be used - clojure-cli - shadow-cljs 3. Choosing clojure-cli is what I think you said up there so I pick that. 4. [prompt] Select a clojurescipt repl type - shadow - shadow-select - custom all of these fail

[nREPL] Establishing direct connection to localhost:36749 ...
[nREPL] Direct connection to localhost:36749 established
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op classpath)
error in process filter: Sync nREPL request timed out (op classpath)
/different port number depending on which repl type I choose though./ So I start again but this time I chose the repl-type as shadow-cljs. - [prompt] Select a clojurescipt repl type * shadow * shadow-select * custom - I go with shadow [prompt] select shadow-cljs build I choose app in my browser I get "shadow-cljs - Stale Client! You are not using the latest compilation output!" When I make a change I get:
[:app] Compiling ...
[:app] Build failure:
The required namespace "" is not available, it was required by...
this was under the alias dev in my deps.edn


so it’s a little more complicated, unfortunately


what I do is I modify the cider-clojure-cli-global-options


but when you run cider-jack-in you can also add a command to specify args before it runs


e.g. C-u M-x cider-jack-in


it’ll ask you for the nREPL command, and you can use that to add additional args, e.g. -A:dev


that’s nice for one offs, but annoying to do over and over so like I said, I add a dir-local for cider-clojure-cli-global-options in my project


  (cider-clojure-cli-global-options . "-A:server:dev")))
is what I have in my .dir-locals.el at the root of my project


nevermind, I just figured a way to make my code work in a way that doens't trigger warnings 🙂


I'm getting a build-report.html with invalid js


has something like this already been reported?


@arne-clojurians can you send me the broken report? I haven't had any reports about that breaking no


oops nevermind


@arne-clojurians fixed in 2.6.6. I accidentally included a dev version of the build reports JS and not the actual release version.


@hlolli btw sorry it took so long but the 2.6.6 release should allow you to use npm link. I didn't test it thought so please do.


ok, test it now


yes, no error, compiling browser with 2.6.6


(and linked the same module as resulted previously in the error)


@thheller I noticed something, yesterday I tried to use :hud false on a project but that didn't worked, I restarted the compilation but the HUD was still showing up


oh I think I removed that option


open an issue so I don't forget adding that in again. HUD should definitely be optional


one question though, the alert box is considered part of HUD?


because I wanted to remove the warning box, I would keep the compiling status and remove just the warnings if I could


yes its all part of the hud but I'm fine adding more fine-grained options like :hud :all :errors-only :off?


(I had so many warnings that the warning box rendering was taking about 10 seconds to have the UI responding...)


the fine-grained options sounds nice


maybe it could be a set


:hud #{:progress :errors}


:hud true | false | #{:compiling :errors :warnings}


sounds like a plan. please open an issue. I won't get to it this weekend and might forget otherwise