This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-15
Channels
- # admin-announcements (1)
- # alda (12)
- # announcements (1)
- # beginners (5)
- # boot (241)
- # clara (2)
- # cljs-dev (7)
- # cljsrn (9)
- # clojure (54)
- # clojure-conj (7)
- # clojure-russia (12)
- # clojurescript (118)
- # cursive (11)
- # editors (3)
- # hoplon (58)
- # immutant (17)
- # off-topic (58)
- # om (1)
- # onyx (12)
- # re-frame (10)
- # reagent (8)
- # spacemacs (6)
I'm sorry this is likely a very dumb question. How can I configure the color of the return values in the boot repl. I assume the answer has something to do with nRepl, but I'm not quite sure where to look or if there is a boot specific way of setting this for my account no matter which project I'm working on. My background color is dark grey and the blue result color is exceedingly difficult to read.
@binduwavell: this annoys me, too
Is there something like the whidbey lein plugin for boot?
@micha that is way better for now, thank you!
Would be nice to have real color output though
@micha can you point me at docs for how to use lein plugins with boot? I'm happy to give whidbey a shot.
Did you see the following from their readme: "Internally, Whidbey reaches into nREPL to replace the default pr-values rendering middleware. See the history for more on the motivations and implementation details behind this project."
He has a nice article on what he did here: https://github.com/greglook/whidbey/blob/master/HISTORY.md
Thanks @micha I hope I can figure out how to get these things to work together, would be super nice! Appreciate the pointer to the Cider-REPL doc...
@micha of course!
I've just downloaded new boot.sh
and it started doing
Downloading .
when launching boot. Is that expected?@jaen: Does the project you are working with have a boot.properties
file which defines BOOT_VERSION?
Strange. If you don't have BOOT_VERSION defined it should use the latest version.
Perhaps you should clear the boot temp dir? (~/.boot/cache)
Probably there is a old ~/.boot/cache/boot.properties
file which points to 2.0.0
But redownloading sounds like a bug
The ~/.boot/cache/boot.properties
points to 2.4.2 for me, but I imagine this was overwritten when I added the boot.properties
to the project.
I don't think project boot.properties should have any effect on global boot.properties
What does boot -V
say if you run it outside the project dir?
Downloading .
#
#Sun Nov 15 11:47:21 CET 2015
BOOT_CLOJURE_VERSION=1.6.0
BOOT_VERSION=2.4.2
#App version: 2.0.0
Hmm the app version looks incorrect
I suggest removing or renaming ~/.boot/cache
Hmm, I've just notice I have a ~/.boot/boot.properties
which pointed to 2.1.2. I've cleared the cache subdir, the lib subdir and put 2.4.2 in the aforementioned file and it stopped
Hm, is there something to set the env values that behaves like with-bindings
so I can have the change scoped to single task only?
@jaen: unlike thread-local bindings, not all changes to the JVM can be "popped" back off the stack
like if you add dependencies to the classpath, there is no way to remove those jars from the classloaders they were loaded into
Right. What what I had in mind was :resource-paths
- boot-immutant
plugin seems to require sources in the resource paths, but that feels weird to put them there, so I wanted to scope it only to the task that requires it.
@jaen: Often it's the correct way to add Clj sources to resource-paths
@jaen: Boot terms source-paths and resource-paths are a bit different from Leiningen's terms. Source-paths means files that should be present in classpath but not present in the JAR (sources that are compiled, like cljs->js, java->class, AOT compiled clj->class) and resource-paths are files which should be present JAR like non-AOT clj
i just added an exe
task to https://github.com/adzerk-oss/boot-jar2bin
you can create standalone *nix executables like boot aot pom uber jar bin --output-dir bin
, and windows exe files like boot aot pom uber jar exe --output-dir bin
(though the exe
task requires launch4j and a little bit of additional configuration via task options)
it will also work with existing jar files, i.e. boot jar --file target/my-project-0.1.0.jar --output-dir bin
, same for the exe
task
@micha: I guess we should work out the push
options before the next release
One solution would be to replace repo-map option with repo-username, repo-password, repo-passphrase
Not sure if other options make sense?
Or should be encourage people to set up separate deploy repositories (like bootlaces does) and not provide those options for push task?
Boot could even provide default deploy-clojars repository with sensible username and password default options
Btw. the changelog for 2.5.0 looks really good!
Fixes many problems I have encountered
There is merging behaviour currently
names
not sure
It makes sense to select the used repo by name in push task
but when you have your creds file you want to associate password and stuff with the repo url i think
Hmm yeah
Perhaps push task could use the similar logic to resolve-deps
https://github.com/boot-clj/boot/blob/master/boot/aether/src/boot/aether.clj#L134 this merges creds by url regex
maybe...
That's the same data that's on boot env?
What's the benefit of moving it from env to edn file?
How would that work with clojars where the creds should only be merged for deploy?
The current creds file matches to repos by url regex
So it would be possible to implement this without much changes
But the problem is that it must be defined somewhere if the repository needs credentials for download and/or deploy
clojars doesn't need credentials for downloading but needs creds for deploymed
datomic repo needs creds for downloading
Not sure
Leiningen has separate repostory configurations for these. :repositories {"clojars" {:url "..."}}, :deploy-repositories {"clojars" {:url "..." :username :gpg :password :gpg}}
like if you want to add some repos only for deploying you can do that in your deploy task
Yeah well as I mentioned, one solution would be to encourage using separate repositories for deploy repos
like deploy-clojars set up by bootlaces
the problem we have now is that the creds are by url, and you can't have different creds for pushing and pulling?
Also, there's a small problem though, repo-map has to be set up in the project but different users can have different preferences to where to retrieve the creds
Maybe one user wants to use creds from the file and other from env variables
But maybe we don't need to support this
Afaik leiningen doesn't support different creds for pushing and pulling
And I don't remember seeing any issues about this
Currently those options are used to define when to use any creds
Testing now
One side-effect would be unnecessary gpg invocation any time dependencies are loaded
Though it should be memoized so it's ran only once per boot process
Yeah depending on your gpg conf
I'm using gnome-keyring as ssh/gpg agent, it saves the password on keyring which is opened when I login
Though I would rather throw last part of gnome away and use something simpler, but gpg-agent is too horrible to use
We don't have to, as gpg binary does that
Yeah, OS X setup was even worse than Ubuntu configuration
The password entry GUI is horrible by default, "I won't let you access other programs or paste any text here because that would be insecure" :<
Looks like clojars works if creds are used for downloading deps
I think the current solution is as good as or perhaps a bit better fit than Leiningen's (separate :deploy-repositories) so if can't come up with better solution we can release it
One could be to introduce some special keys to repository maps, like ["clojars" {:url "..." :deploy {:username :gpg, :password :gpg}}]]
where :deploy value would be merged with toplevel when doing deploy and dropped when downloading deps
Could be acceptable as the repository maps aren't even now completely identical to aether presentation, because of the :gpg and :env special values
That requires gpg invocation, which we probably want to avoid for cases where it's not necessary
What would the first one contain?
maps with url regex and options about where to get the creds from?
Perhaps URL and such should still be set with set-env!
and the file only used for setting cred source
I'm not sure
Or perhaps the repo defaults are read from the env, and then repositories.edn could overwrite or add values to those and it could use the same regex matching as creds file currently
Could also make sense to allow setting the same :authentication option or such from set-env
What about boot default repositories?
And if the repos.edn is the default, it can't use regex matching as there is nothing to match against
Ah, yes I think so
Yes makes sense
the env sets the available repos and stuff from repos.edn is merged into that, but values from env taking precedence
perhaps we don't need all the special conventions of env vars and credentials files and all that