This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-03
Channels
- # admin-announcements (21)
- # beginners (13)
- # boot (215)
- # cider (36)
- # clojure (24)
- # clojure-berlin (7)
- # clojure-japan (59)
- # clojure-korea (2)
- # clojure-russia (5)
- # clojure-seattle (1)
- # clojure-uk (5)
- # clojurescript (119)
- # clojurex (4)
- # code-reviews (4)
- # cursive (8)
- # editors (3)
- # euroclojure (27)
- # ldnclj (15)
- # off-topic (57)
- # re-frame (1)
- # reagent (108)
- # yada (3)
I added (sift :move {#"\.cljs$" "ion/poly/$1"})
between (pom)
and (jar)
and it errors out
ok, so in this build.boot file, since I'm just creating a jar, the dependency stuff is just going into the pom.xml file so that consumers of ion/poly will know that they need to resolve these dependencies, is that right?
(set-env!
:dependencies '[[org.clojure/clojurescript "0.0-3308"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]])
altho, it's up for debate whether libraries should depend on the version of the language they were written against
you may consider omitting the explicit cljs dependency, and just assume consumers of your cljs library are using a cljs compiler of their own choosing
So how do developers manage working on a library locally as far as installing to a local maven and such where the files need to be deleted or the minor version number changed frequently?
Is there an elegant way to delete the existing jar from the local maven repo before recreating it?
Okay, but otherwise I can rerun boot pom jar install
for the same version and it will update what's in the .m2 cache?
snapshots are like the name, they're snapshots of a version that's still being developed
the SNAPSHOT thing is treated specially by maven, it lets you deploy multiple artifacts to the repo with the same "coordinates"
when you make a new commit HEAD just points to a different commit, but the old HEAD isn't deleted
in this way i suppose a snapshot version is like a branch, non-snapshots are like tags
it's a little weird because like if you move a tag it doesn't delete the commit that tag pointed to
I think I'm good to go for a while. Thanks. And on the consuming side I'm doing [ion/poly "LATEST"]
so I'm kind of forced to keep up with my ion/poly library development, at least for now.
if you run into issues where it doesn't find the thing, i found that using "(0,)"
sometimes works
First time boot user. Updated JVM options for heap and permspace, but still getting out of memory errors when I run boot dev
on an empty reagent project.
Fixed: I didn't know export was specific to one terminal session.
So, I added another library to decomplect/ion and changed my boot file: https://github.com/decomplect/ion/blob/master/build.boot
The cuss library has a macros.clj file so I need to change the re used by sift: (def +re-clj-files+ #"(^.*\.cljs)$")
Why are you building two projects from single repo? Why do you have a separate macro file?
Because you need regex đ (Unnecessary complexity for no gain)
If they share some resources it would be justified
@petrus: if you can upgrade to jdk8 you don't have to worry about the memory settings
They are all cljs libraries. I can use a single build.boot to manage them. I eliminate recreating the same directory structure in a bunch of separate repositories. I wouldn't call that no gain.
#"(^.*\.(cljs|clj|cljc))$"
or even clj(|c|s)
Oh alejandro already answered that
As for the separate macros.clj file, I thought you couldn't define macros in cljs and they had to be in a clj file?
And about macros file: if the macro is something that the library users will want to use, it is good idea to place it in ion/cuss/core.clj and add (:require-macros ion.cuss.core) to the cljs file. This way the lib users don't need to use :refer-macros/:require-macros.
Yeah you need cljc or clj file but it's best to use same ns as for cljs file
@juhoteperi: Ah, good tip. Thanks.
then if users do (:require [om.core :as om]) they can access the macros using om alias automatically
But not through :refer (at least yet)
I guess this should be documented in cljs wiki đ
So does that mean I can or cannot do this in ion/core.cljs:
(:require-macros
[ion.cuss.core :refer [defbreakpoint]]
I think that should work
https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#namespaces ah it is described here
I am getting the following message during boot dev task: WARNING: Different CLJS version via transitive dependency: 0.0-2816
How can I check what is causing this transitive dependency?
@juhoteperi: thanks for your help - everything is working fine now
I thought about writing it so that I passed an argument on the command line but that's more work.
boot show -p
gives me something like:
[!] com.google.guava/guava
â 18.0
re-frame
âď¸ 17.0
reagent
Should I understand that this means guava 18.0 is required by re-frame and 17.0 is required by reagent, and boot is deciding to use the least common denominator 17.0?
this is the underlying machinery that powers the maven repository stuff in boot, maven, and leiningen
you can add [reagent "1.2.3" :exclusions [com.google.guava/guava]]
, which will instruct aether to not use the transitive dependency from reagent
This also means if I order my :dependencies correctly I donât really have to worry about :exclusions?
so transitive deps that are fewer times removed from the project in terms of transitive "hops" will be chosen over dependencies that are introduced from more remote depedncies
i think maybe in some cases, but since transitive depdenncies is a graph there is no total ordering of :dependencies that can achieve all possible permutations of transitive deps
like you will probably run into the situation where reordering the deps will introduce other unwanted changes
i'm not even sure exactly how the ordering of :dependencies affects the resolution decisions
On the subject of :dependencies, what does :scope âtestâ
that I see in some templates do?
:scope is an annotation you add to a pom when you make a jar you want to distribute via maven
the thing to keep in mind about :scope is that it has no effect whatsoever on the project itself
suppose you have a clojure project, and you use some testing framework during development
when i use your project in my own :dependencies, i won't pull in acme/testing
because you put :scope "test"
in the pom
:scope "test"
means that the dependency is only needed when developing the project, not when using it from another project
Yes so if I make a jar of my boot project, the ones with :scope test will not be âexportedâ so to speak
but they'll still be in the pom, so tools can inspect that and know things that might be useful
there is also :scope "provided"
which says that the dependency is needed at runtime (i.e. by consumers), but it's expected to have been specified explicitly by the consumer
when you make a library that's intended to be used in a servlet container you know that there will already be some version of the servlet classes in the classpath already
so you can use :scope "provided"
to indicate that you need some version of servlet api in the classpath
but you don't cause confusion by adding your version to the transitive deps of the project that already has servlet api provided by the container
While I have your ear, Iâm also getting temp-dir! was deprecated, please use tmp-dir! instead
these types of warnings
What could cause this error: java.io.FileNotFoundException: Could not locate cljs/env__init.class or cljs/env.clj on classpath: , compiling:(cemerick/piggieback.clj:1:1)
you should add a clojure :dependency to your project like :dependencies
[[org.clojure/clojure "1.7.0"] ...]`
#Sat Jul 04 01:42:27 CST 2015
BOOT_CLOJURE_VERSION=1.6.0
BOOT_VERSION=2.1.2
#App version: 2.0.0
because boot needs to have clojure already loaded before it can evaluate your build.boot file
so you need to configure the version of clojure that boot itself uses separately from the project build.boot
if you don't wnat to use 1.7 by default (i don't see why not, though), you can set it for that specific project
because it ensures that you know exactly which version of boot will be building your project
If I want to go back to a previous point in time, bootâs âenvironmentâ is also adjusted
boot refers vars from the boot.core
namespace into the boot.user
namespace (your build.boot file)
but like for automated builds it seems like a good idea to fix the version of everything
sooheon:ku-live% BOOT_CLOJURE_VERSION=1.7.0 boot -u
#
#Sat Jul 04 02:01:26 CST 2015
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.1.2
#App version: 2.0.0
WARNING: update already refers to: #'clojure.core/update in namespace: clj-http.client, being replaced by: #'clj-http.client/update
here is another error, which I thought was caused by the boot_clojure_version
clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No single method: _setup of interface: cljs.repl.IJavaScriptEnv found for function: -setup of protocol: IJavaScriptEnv, compiling:(cemerick/piggieback.clj:149:5)
java.lang.IllegalArgumentException: No single method: _setup of interface: cljs.repl.IJavaScriptEnv found for function: -setup of protocol: IJavaScriptEnv
Iâll look into the version of piggieback that re-com introduces, which seems to be the problem
@sooheon: These are the latest versions of various dependencies that I have in my boot file, fwiw:
:dependencies '[
[adzerk/boot-cljs "0.0-3308-0" :scope "test"]
[adzerk/boot-cljs-repl "0.1.10-SNAPSHOT" :scope "test"]
[adzerk/boot-reload "0.3.1" :scope "test"]
[boot-cljs-test/node-runner "0.1.0" :scope "test"]
[pandeiro/boot-http "0.6.3-SNAPSHOT" :scope "test"]
[org.clojure/clojurescript "0.0-3308"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
boot-cljs-repl is the source of some errors and needs some lovin' - I'm hoping I have time in the next couple of days to help with that
@alandipert: I've got boot-cljs-repl working pretty well here:
C:\Users\Patrick\code\ing\informing [master +1 ~1 -0 !]> boot repl -c
REPL-y 0.3.5, nREPL 0.2.10
Clojure 1.7.0
Java HotSpot(TM) Client VM 1.8.0_45-b15
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from : [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
boot.user=> (start-repl)
<< started Weasel server on ws://127.0.0.1:53326 >>
<< waiting for client to connect ... â[1mConnection is ws://localhost:53326
â[mâ[1mWriting boot_cljs_repl.cljs...
â[m connected! >>
To quit, type: :cljs/quit
nil
cljs.user=> (doc inc)
-------------------------
cljs.core/inc
([x])
Returns a number one greater than num.
nil
cljs.user=> (in-ns 'app.core)
nil
app.core=>
@alandipert: So if you still wanted to add me as a maintainer on boot-cljs-repl I can get these changes applied. And I'll need some hand-holding with pushing this out to clojars. And I can work on boot-cljs-example if you want as well.