Fork me on GitHub
#shadow-cljs
<
2019-04-24
>
caleb.macdonaldblack00:04:32

I recently removed project.clj and starting using only shadow-cljs.edn for my project. Since then, whenever I create a new test deftest I need to delete .shadow-cljs and restart shadow-cljs otherwise my new test is not detected. Any idea what's up with that? I'm using karma for my tests.

orestis07:04:57

Is npm/node strictly needed to start a shadow build?

orestis07:04:36

(Trying to run a release build on a CI server, would like to not install node just to kick-start shadow-cljs if it’s avoidable)

orestis07:04:58

Though I guess I have to do npm install anyway right? So probably never mind 🙂

thheller07:04:32

@orestis if you don't have any JS deps you can get away without node/npm. otherwise you'll need it

thheller07:04:19

@caleb.macdonaldblack that sounds odd and I doubt that you really actually need to delete the .shadow-cljs folder and for the record DON'T delete the folder

thheller07:04:28

otherwise its impossible to track down what was wrong

thheller07:04:46

if I could make the folder undeleteable I would

thheller07:04:06

if you walk me through what you are doing I can maybe help?

romain08:04:34

@thheller I really liked your post "What shadow-cljs is and isn't" 🙂. I think it would be good for newcomers and users a post about shadow cljs & figwheel. The latter is well known for clojurescript development but it might confuses people when choosing tools & solutions

thheller08:04:46

@romain yeah I've been meaning to write a post like that but I have never used figwheel myself so I don't feel qualified to talk about it 😛

thheller08:04:31

I'm planning to write a couple more posts on that front though, just busy with other stuff currently

romain09:04:56

@thheller Haha ok 🙂. When I wanted to do cljs after a long period, I saw shadow-cljs but I was wondering "eeh what about my figwheel? I don't understand how it will plug into" whereas shadow is a different entry in cljs world

thheller09:04:03

well yeah the next post I sort of started writing is "hot-reload in shadow-cljs"

thheller09:04:33

that'll certainly contain a section comparing to figwheel

thheller09:04:46

and hopefully make it clear that hot-reload is possible without figwheel 😉

romain09:04:57

I should dive into shadow someday ^^'

Robin Jakobsson12:04:48

Does anyone know what X Compilation failed. means, in regards to an imported npm project (`@ionic/react`)?

thheller12:04:59

depends on the rest of the error?

Robin Jakobsson12:04:26

it's followed by errors in file: /Users/robin/Code/my-project/node_modules/@ionic/core/dist/esm/es5/ionic.core.js

thheller12:04:46

I think thats using dynamic import which is not currently supported

Robin Jakobsson12:04:10

ahaaa, yes - I believe it does.

Robin Jakobsson12:04:51

are there any known workarounds?

thheller12:04:04

I guess you have to use webpack

Robin Jakobsson12:04:45

Ok! Thanks for the quick response, and for your work on shadow-cljs :thumbsup: !

eoliphant16:04:41

hi, I;m running into an issue with the “fannypack” react lib.

[:main] Build failure:
The required JS dependency "reakit/styled" is not available, it was required by "node_modules/fannypack/lib/styled/index.js".

Searched in:/Users/erichkoliphant/Dropbox/projects/fannypack-app/node_modules

You probably need to run:
  npm install reakit/styled
...
; the call in in the index.js file that's causing the issue

Object.defineProperty(exports, '__esModule', { value: true });

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var selector = require('./selector.js');
var space = require('./space.js');
var styled = require('reakit/styled');
Not exactly sure which flavor of JS weirdness is causing this particular issue

thheller16:04:16

@eoliphant I don't understand? thats a normal commonjs require. nothing special about it? do you have reakit installed? and made sure its the correct version?

eoliphant16:04:56

yeah, after you walked through a few issues, with some other libs, I was looking for some of the more common things that pop up. But that “looks” ok. Yeah, reakit is installed, so I dunno, if there’s somethign else that’s hinky with their packaging, and I can do say ["reakit" :refer (styled)] in my code with no problem

thheller16:04:30

check node_modules/reakit/package.json version and see if that matches the version fannypack expects

thheller16:04:35

I'm guessing it doesn't

thheller16:04:05

["reakit" :refer (styled)] is not require("reakit/styled"). it would be ["reakit/styled" :as styled]

eoliphant19:04:59

ah right.. will check it out

deplect20:04:45

quick question, is it possible to work with "local" jars with shadow-cljs

deplect20:04:22

I am splitting some work between two projects, and am publishing to clojars, but want to develop locally

deplect20:04:28

on the libs

thheller20:04:36

if you mean :local/root then you need deps.edn for that

deplect20:04:07

let me search for this in the docs

deplect20:04:59

I believe that will do the trick, thanks @thheller!

deplect20:04:48

I placed a deps.edn in my project root, and restarted the shadow-cljs process, it seems to still point to my .m2 directory. Doing something wrong? I have also defined the lib in de :dependencies section.

deplect20:04:15

[io.monetashi/yesod "0.1.1"] in :dependencies

deplect20:04:51

`{:deps {io.monetashi.yesod {:local/root "~/Sites/clojure/libs/io.monetashi.yesod"}}}` in deps.edn

thheller20:04:09

@deplect if you have :deps in your shadow-cljs.edn config then :dependencies and :source-paths in shadow-cljs.edn have no effect

thheller20:04:39

if you just add a deps.edn that will have no effect. you need to tell shadow-cljs to actually use it.

thheller20:04:28

so either :deps true or :deps {:aliases [:cljs]} or so if you want to use a deps.edn profile.

deplect20:04:45

ok, thank you again