Comments (7)
In your CLJS code, what does the (ns) form look like where the basil.test.test-macros namespace is :required or :used? The goog.require error makes me think that maybe you used :require or :use instead of :require-macros or :use-macros.
from lein-cljsbuild.
The CLJS code that uses basil.test.test-macros
is a CLJ file (softlinked as a CLJS) and has the following:
(ns basil.test.core
(:require [basil.types :as types]
[basil.core :as core]
[basil.util :as util])
(:use;*CLJSBUILD-REMOVE*;-macros
[basil.test.test-macros :only [deftest is is-thrown testing slot-compiler
;*CLJSBUILD-REMOVE*;RuntimeException
]]))
from lein-cljsbuild.
Hmm, when you say softlinked, do you mean literally a symbolic link to the file?
from lein-cljsbuild.
Sorry, it was another file that is symlinked – the test_macros.clj
file was never symlinked. I have now renamed this file so that they are different namespaces now – macros
for Clojure and macros-cljs
for CLJS, controlled as follows (in file basil/test/core.clj
that is also symlinked as basil/test/core.cljs
in another directory).
(:use;*CLJSBUILD-REMOVE*;-macros
[basil.test.macros;*CLJSBUILD-REMOVE*;-cljs
:only [deftest is is-thrown testing slot-compiler
;*CLJSBUILD-REMOVE*;RuntimeException
]])
However, the error message still persists:
goog.require could not find: basil.test.macros
from lein-cljsbuild.
Hmm, without seeing the source for the project, it's hard for me to tell exactly what's going wrong. I can mention a few guidelines, though, that I think might help track down the problem:
- The crossover setup should not include any symbolic links at all.
- None of the sources for the crossover namespaces should exist in the :cljsbuild/:source-path directory in a clean checkout of your project.
- The *.clj file providing the macros should be referred to by the same name in both clj and cljs code.
Other than that, you might try changing the :crossovers config in the advanced
example to use finer granularity. If you can reproduce the problem there, I'll be better able to help track down the cause.
from lein-cljsbuild.
I followed your guidelines and the issue is resolved. Thanks!
I also realized that I need to build one JS file for distribution, and one for testing. The testing JS file needs to include extra .cljs
files, hence it may be useful to have :src-cljs
accept a vector of directory locations instead of just one location. Please let me know if there is already a solution for that, or else I will file an issue requesting that feature.
from lein-cljsbuild.
I'm glad you have things working!
I don't think there's a good way to do that right now. The 0.1.0 release that I'm working on, though, has built-in support for running tests, and I'm working on adding an example of this to the advanced
project right now. I think this new feature should allow you do do what you want (although perhaps in a somewhat different manner).
I hope to get 0.1.0 released in the next 1-3 days.
from lein-cljsbuild.
Related Issues (20)
- Custom tagged literals cause build failure HOT 1
- Fails on Java 9? HOT 2
- :asset-path isn't documented HOT 1
- Circular dependencies : Warn user when a namespace requires itself HOT 2
- Adding 'monger' dependency breaks cljsbuild. HOT 2
- Possibility to add cli options to closure compiler. HOT 2
- reload-clojure causes compilation failure in portable projects HOT 4
- Could not write JavaScript nil HOT 1
- Exception (...)/objectutil.js is not a relative path HOT 7
- Consider exposing :watch-fn compiler option? HOT 1
- :prep-tasks dont work when running `lein cljsbuild ...`
- Miraculously disappearing dependencies when using lein cljsbuild auto. HOT 2
- warning-handlers: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn HOT 2
- Duplicate input error HOT 1
- Recompiling compiled app with different optimization type
- Simple example project does not compile HOT 1
- `lein trampoline cljsbuild repl-rhino` fails with jdk 11 HOT 1
- cljsbuild-example-simple didnt run with lein 2.9.5 and Java version > 11 & 15 HOT 1
- cljsbuild cannot find reagent HOT 1
- Fails with ClojureScript newer than 1.10.764 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lein-cljsbuild.