Fork me on GitHub
#shadow-cljs
<
2019-04-21
>
Nolan13:04:56

hi, i think this issue might not have been resolved as expected: https://github.com/thheller/shadow-cljs/issues/483

Nolan13:04:56

even after upgrading to version 2.8.32, i still am only able to pull dependencies when i specify proxy configuration via the shadow-cljs.edn file in project root

thheller19:04:46

it should be :maven {:proxy ...} in ~/.shadow-cljs/config.edn

thheller19:04:56

I still need to document this properly

Nolan12:04:30

Okay, yeah, that worked. Thank you!!

Nolan13:04:01

> shadow-cljs compile app
shadow-cljs - config: /Users/hch429/side-projects/clojurescript/my-web-app/shadow-cljs.edn  cli version: 2.8.32  node: v10.12.0
shadow-cljs - updating dependencies
shadow-cljs - dependency update failed - Failed to collect dependencies at quil:quil:jar:3.0.0

wilkerlucio16:04:26

just got this warning, but sounds weird:

------ WARNING #1 - :invalid-arithmetic ----------------------------------------
...
--------------------------------------------------------------------------------
  32 |   (let [formatted-points (misc/cents->display points)]
  33 |     (if (pos? points)
  34 |       (str "+ " formatted-points)
  35 |       (str "- " (- formatted-points)))))
-----------------------^--------------------------------------------------------
 cljs.core/-, all arguments must be numbers, got [#{string clj-nil}] instead
--------------------------------------------------------------------------------
Is there a different way to get a negative version of a number other than that?

lilactown16:04:40

it sounds like the issue is you're passing a string into -. why are you doing that?

lilactown16:04:12

do you want it to display as a negative number?

wilkerlucio16:04:57

its a formatting thing, its rendering a string with "- 45" for example, its adding the space between the minus and the number (and has to invert the number to avoid the minus duplicated)

wilkerlucio16:04:08

seems like that got inference lost

lilactown16:04:25

sounds like you'll want to invert the number before converting to string if you want to appease the warning

wilkerlucio16:04:24

just realized the warnings is accurate indeed, formatted-points is a str out of misc/cents->display, so calling - on it is wrong

macrobartfast19:04:36

after running:

npx shadow-cljs watch frontend
I get:
shadow-cljs - starting via "clojure"
Executable 'clojure' not found on system path.
I'm not sure where to start, any thoughts?

lilactown19:04:46

sounds like you have :deps true in your shadow-cljs.edn

lilactown19:04:14

and you don’t have clojure installed on your system

macrobartfast19:04:41

I wasn't quite sure how to do the second... fumbled through https://raphamorim.io/using-clojure-as-cli

macrobartfast19:04:58

but that isn't probably what is meant by installing clojure on my system.

lilactown19:04:45

however, those steps are unneeded

lilactown19:04:00

is there a particular reason you are using :deps true?

macrobartfast19:04:21

ah, only that it was part of a project I cloned...

lilactown19:04:22

that will obviate the next steps I might suggest

lilactown19:04:42

is this a boilerplate you cloned, or a particular project that youre working on?

lilactown19:04:40

ah OK. kind of annoying that the author uses :deps true

macrobartfast19:04:56

ah ok... way over my head... but learning...

macrobartfast19:04:11

I want a fun way to play with webgl stuff interactively...

macrobartfast19:04:22

and, you know, see pretty things in my browser.

macrobartfast19:04:12

setting :deps to false spewed promising things, then

The required namespace "applied-science.js-interop" is not available, it was required by "gespensterfelder.cljs"

lilactown19:04:02

the problem: shadow-cljs can usually be in charge of downloading, providing and building clojurescript libraries. in that case, you put your dependencies in the shadow-cljs.edn file. the author has elected to tell shadow-cljs, “Hey don’t bother managing my dependencies for me. Instead, use my system’s clojure installation and feed it the deps.edn file in my project to download and provide dependencies for me.”

macrobartfast19:04:36

ah ok... yeah... :deps false for me, then, probably, in general.

macrobartfast19:04:15

I want to make interactive webgl things that update from websocket/SSE events and so on...

macrobartfast19:04:24

and develop interactively.

macrobartfast19:04:05

I actually don't understand why anyone would not want to be doing that today.

lilactown19:04:51

OK, so you can either: 1. install clojure on your system. if you have brew setup, it’s as easy as brew install clojure 2. use this shadow-cljs.edn file instead: https://gist.github.com/Lokeh/e8e1ec026e1021f1b1818efd79d7cbef

lilactown19:04:21

I added a :dependencies key + value in the shadow-cljs.edn file based on the deps.edn in the repo you posted: https://github.com/jackrusher/gespensterfelder/blob/master/deps.edn

macrobartfast19:04:40

compiling... (eyes bulging in anticipation)...