Fork me on GitHub
#clojure
<
2019-07-25
>
borkdude09:07:48

@bronsa In case you want to get rid of some refer :alls in tools.reader: https://twitter.com/borkdude/status/1154319272539295744/photo/1 πŸ™‚

borkdude09:07:37

I'll add sorting to that message

bronsa09:07:56

@borkdude the refer :alls are there for a good reason :)

bronsa09:07:56

t.r supports older versions of clojure, providing custom versions of missing features

bronsa09:07:11

there are vars in the util namespace that are only present in those older versions, so we can't refer them statically

bronsa09:07:41

to be honest, there's probably little point in supporting those older versions of clojure nowadays, so may aswell bump the minimum requirement and get rid of that ugly hack

bronsa09:07:54

would mean bumping minimum supported version from 1.4 to 1.7

bronsa09:07:19

I think that should be fine, I'll check with Alex later

borkdude09:07:41

1.7 was released in June 2015, which means a 4 year old version. Seems reasonable.

bronsa09:07:49

IIRC the stats for people on <= 1.7 are in the low single digits if at all

andy.fingerhut09:07:20

Question Q15 on the 2019 Clojure survey showed 3.3% on 1.7 or earlier. It did not break down within that: https://www.surveymonkey.com/results/SM-S9JVNXNQV/

Alex Miller (Clojure team)12:07:09

A while back I stopped matrix testing all contribs on anything older than 1.7

Ivar Refsdal12:07:06

Did anyone have an issue with tools.deps crashing when specifying Timbre log level in a system property? The failing code is inside tools.deps. https://github.com/ptaoussanis/timbre/issues/294

Alex Miller (Clojure team)13:07:04

that's pack calling into tools.deps, so could be pack too

Alex Miller (Clojure team)13:07:54

clj is using latest tools.deps here, but pack is calling into an older version 0.6.496 from March. that should be fine, just pulling the thread.

viesti13:07:55

hmm, pack needs a deps.edn file, the above script provices inline deps

Alex Miller (Clojure team)13:07:50

same error with a local deps.edn file

Ivar Refsdal13:07:48

Thanks @viesti Yes, it's the same error with local file. I've updated the issue now though (echo > deps.edn)

Ivar Refsdal13:07:55

And thanks Alex

viesti13:07:49

I'd bet on :paths ["."] causing trouble

viesti13:07:32

works with :paths ["src"] with a src/myapp/main.clj and -m myapp.main for pack invocation

Ivar Refsdal13:07:17

mkdir -p src/run_app || true
echo '(ns run-app.main) (defn -main [& _] (println "Hello world"))' > src/run_app/main.clj
echo '
{:paths ["src"]
 :deps {com.taoensso/timbre        {:mvn/version "4.10.0"}
        com.fzakaria/slf4j-timbre  {:mvn/version "0.3.14"}
        org.slf4j/log4j-over-slf4j {:mvn/version "1.7.14"}
        org.slf4j/jcl-over-slf4j   {:mvn/version "1.7.14"}
        org.slf4j/jul-to-slf4j     {:mvn/version "1.7.14"}
        pack/pack.alpha            {:git/url    ""
                                    :sha        "9911c70bcfd6e94383d3d54b6e8befa492222926"
                                    :exclusions [org.slf4j/slf4j-nop]}}}' > deps.edn

clojure \
-J-DTIMBRE_LEVEL=warn \
-Sverbose \
-m mach.pack.alpha.jib \
--verbose \
--quiet \
--image-name ivarref/demo:latest \
--image-type docker \
-m run-app.main
Still fails Edit: Use -m run-app.main

viesti13:07:42

ah, forgot the -J-DTIMBRE_LEVEL=warn \ here

Ivar Refsdal13:07:51

Yes that is causing the issue...

viesti13:07:20

were you trying to pass -DTIMBRE_LEVEL=warn into the container?

Ivar Refsdal13:07:47

No, into the build process

Ivar Refsdal13:07:57

If you remove it, you will get tons of DEBUG output from apache stuff

viesti13:07:19

that is because of --verbose

Ivar Refsdal13:07:07

No, removing --verbose and keeping --quiet still gives e.g.: 19-07-25 13:53:38 nsd367 DEBUG [org.apache.http.impl.client.DefaultHttpClient:509] - Connection can be kept alive indefinitely

viesti13:07:57

why is that there? πŸ™‚

Ivar Refsdal13:07:08

Also happens without -Sverbose... That is for printing Clojure versions

Ivar Refsdal13:07:41

+ clojure -m mach.pack.alpha.jib --quiet --image-name ivarref/demo:latest --image-type docker -m run-app.main
+ wc -l
516
516 lines of DEBUG output. This only happens after including timbre and slf4j-timbre. And setting TIMBRE_LEVEL=warn crashes tools.deps/somewhere

Ivar Refsdal13:07:58

Timbre sets the logging level to DEBUG by default

viesti14:07:06

interesting πŸ™‚

viesti14:07:56

hmm, so the logging deps in :deps bleed to the pack invocation

viesti14:07:26

not sure if it is timbre, but somehow logging setup defaults to being verbose

viesti14:07:49

you can prevent bleeding by putting the application dependencies behind an alias, and pass that to pack invocation

viesti14:07:48

something like:

{:paths ["src"]
 :aliases {:pack {:extra-deps {pack/pack.alpha            {:git/url    ""
                                                           :sha        "9911c70bcfd6e94383d3d54b6e8befa492222926"}}}
           :main {:extra-deps {com.taoensso/timbre        {:mvn/version "4.10.0"}
                               com.fzakaria/slf4j-timbre  {:mvn/version "0.3.14"}
                               org.slf4j/log4j-over-slf4j {:mvn/version "1.7.14"}
                               org.slf4j/jcl-over-slf4j   {:mvn/version "1.7.14"}
                               org.slf4j/jul-to-slf4j     {:mvn/version "1.7.14"}}}}}
and then call
clojure \
    -A:pack \ <-- alias where pack itself lives
    -m mach.pack.alpha.jib \
    --image-name foo/demo:latest \
    --image-type docker \
    -A main \  # <-- tell pack which aliases to include
    -m myapp.main

viesti14:07:20

two hard things, naming, logging setup

Ivar Refsdal14:07:49

Namings things: Hehe... Thanks @viesti Yes, I think the error here is that the default deps bleed back to the pack invocation. So this is a pack.alpha issue I guess. I will have a closer look tomorrow at work. Thanks for the input.

viesti14:07:12

:D thanks!

viesti14:07:37

Driving Clojure and Finnish onwards to the world :)

viesti14:07:46

pack dep itself is best to put behind an alias, to not include it into the application dependencies

csd18:07:54

I have the following under :plugins in my ~/.lein/profiles.clj: [lein-clique "0.1.2" :exclusions [org.clojure/clojure]] Regardless, when I run lein clique within my project, I get the following errors:

Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Generating dependency graph for  /Users/chris/dev/clojure-sso/src/clojure
WARNING!!! version ranges found for:
[lein-clique "0.1.2"] -> [lacij "0.8.0"] -> [org.clojure/clojure "[1.2.0,)"]
Consider using [lein-clique "0.1.2" :exclusions [org.clojure/clojure]].
[lein-clique "0.1.2"] -> [lacij "0.8.0"] -> [tikkba "0.4.0"] -> [org.clojure/clojure "[1.2.0,)"]
Consider using [lein-clique "0.1.2" :exclusions [org.clojure/clojure]].
[lein-clique "0.1.2"] -> [lacij "0.8.0"] -> [tikkba "0.4.0"] -> [org.clojars.pallix/analemma "1.0.0"] -> [org.clojure/clojure "[1.2.0,)"]
Consider using [lein-clique "0.1.2" :exclusions [org.clojure/clojure]].

Exception in thread "main" Syntax error macroexpanding clojure.core/ns at (clojure/tools/namespace/find.clj:9:1).
Call to clojure.core/ns did not conform to spec.
	at clojure.lang.Compiler.checkSpecs(Compiler.java:6971)
	at clojure.lang.Compiler.macroexpand1(Compiler.java:6987)
	at clojure.lang.Compiler.macroexpand(Compiler.java:7074)
	at clojure.lang.Compiler.eval(Compiler.java:7160)
	at clojure.lang.Compiler.load(Compiler.java:7635)
[...]
It seems like the spec error is being associated to clojure core itself. Anyone have any idea what's going on here, as well as why my :exclusions isn't working?

Alex Miller (Clojure team)18:07:40

the spec error is at clojure/tools/namespace/find.clj:9:1, which is in org.clojure/tools.namespace

Alex Miller (Clojure team)18:07:56

that is a known issue, fixed long ago

Alex Miller (Clojure team)18:07:13

I expect one of your deps or plugins is using an old version of tools.namespace

Alex Miller (Clojure team)18:07:48

lein deps :tree might help track it down

Alex Miller (Clojure team)18:07:35

and if you need to get past it to be able to track it down, you can turn off macro spec checking with the jvm option -Dclojure.spec.skip-macros=true

Alex Miller (Clojure team)18:07:51

you'd set this in project.clj under :jvm-opts

csd18:07:40

i'm guessing it must be an issue in lein-clique's deps, seeing as i don't have a similar issue when compiling my project. is there something analogous to lein deps :tree for the plugin rather than the project?

csd18:07:55

i guess maybe if i cloned the plugin repo and ran it inside as a project

bronsa20:07:18

yep i'll drop to 1.7 in the next few days

borkdude21:07:52

here's the textual format of the picture I posted this morning, in case you want to use it:

clojure/tools/reader.clj:18:53: warning: replace :all with [char desugar-meta ex-info? namespace-keys numeric? second' whitespace?]
clojure/tools/reader.clj:20:55: warning: replace :all with [match-number number-literal? parse-symbol read-comment read-past throwing-reader]

bronsa22:07:15

thanks a lot

noisesmith18:07:00

@csd lein help deps shows lein deps :plugin-tree

borkdude18:07:04

@csd what's the reason you want a graph of namespaces, just out of curiosity

csd18:07:32

i'm trying to visualize how the functions in this project interact. thought lein-clique might provide that

borkdude18:07:34

I was asking since clj-kondo (https://github.com/borkdude/clj-kondo) knows this information too, it just doesn't output it to a graph. maybe a nice feature to add

csd19:07:55

that would be nice

csd19:07:02

seems like lein-clique is no longer being maintained

borkdude19:07:26

I made an issue for it. in which format would this be useful to you, EDN?

csd19:07:23

well please don't do it just for my benefit. lein-clique was appealing because it would generate a graphviz document and so was relatively low fuss

borkdude19:07:46

yeah, I'm just putting the issue there, because it's fun to do and possibly useful

πŸ‘ 8
noisesmith20:07:26

creating graphiz is not hard btw

borkdude18:07:36

including a newer version of tools.reader in a profile might help and then call clique with lein with-profiles +tools.reader clique

borkdude20:07:06

congrats on the new forum. I cast my first vote: https://ask.clojure.org/index.php/740/locking-macro-fails-bytecode-verification-native-runtime I see this thing is built in PHP, is it an off the shelf SO clone?

Alex Miller (Clojure team)20:07:32

yeah, it's an oss thing

Alex Miller (Clojure team)20:07:42

probably pre-dates SO :)

borkdude20:07:47

what is the name of this product?

borkdude20:07:09

who downvoted that issue! 😠 πŸ˜‰

ghadi20:07:18

me πŸ™‚

ghadi20:07:36

it's not enough to fix Graal

ghadi20:07:10

I'll have a chance to talk to the native-image people on Tuesday -- I have a lot of questions

ghadi20:07:27

Happy to bring along any questions anyone has, too

borkdude20:07:31

I think you're approaching it from the wrong direction. Not everything in Clojure is possible in Graal, but some things are fixable.

Alex Miller (Clojure team)20:07:06

Ghadi is but one vote. Make your voice known... :)

borkdude20:07:17

e.g. now you cannot use spec or pprint in a graalvm binary due to the locking issue. but still a lot of useful things work can be made with it

borkdude20:07:07

are votes in that system prioritised over the ones in JIRA?

Alex Miller (Clojure team)20:07:43

this is a place for users to vote

Alex Miller (Clojure team)20:07:00

we look at many things when deciding what to do

Alex Miller (Clojure team)20:07:14

so neither is prioritized over the other; they are both inputs

carkh20:07:23

is this forum an official thing ?

carkh20:07:57

oh indeed

kenny21:07:58

Is the forum kept up to date with jira? e.g. when a new jira ticket is created a new question (?) is opened? and when the same jira is resolved, the question becomes resolved? Are jira comments also mirrored?

Alex Miller (Clojure team)21:07:43

no, not linked in either direction, was just seeded

Alex Miller (Clojure team)21:07:57

the idea is that users will add problems and enhancements on https://ask.clojure.org

Alex Miller (Clojure team)21:07:33

as needed, we'll turn new issues into jiras

bfabry21:07:10

is there any way to filter for unanswered questions? that’s a fun way for people to help out

Alex Miller (Clojure team)21:07:20

yes, there are filters on the questions page

Alex Miller (Clojure team)21:07:41

oh, actually maybe there isn't there

carkh21:07:44

damn i just posted two issues there ><

Alex Miller (Clojure team)21:07:02

it's ok, they'll still get handled

carkh21:07:07

cool thanks

Alex Miller (Clojure team)21:07:12

but you can post them on ask too

kenny21:07:52

Ah. Previously I was subscribed to a number of jira issues to know when they got merged in, what people were saying, etc. I found that quite useful. Is there a way to do that?

Alex Miller (Clojure team)21:07:51

@kenny yes, you can star a question to "watch" it

kenny21:07:07

Further, given jira and ask are not linked, how do users vote on issues to inform decisions about future releases?

kenny21:07:20

But jira and ask aren't linked, right?

Alex Miller (Clojure team)21:07:23

they are not linked in either direction, other than manually

Alex Miller (Clojure team)21:07:58

it's possible that could change

kenny21:07:06

If they aren't linked then how do you keep up to date with the jira changes?

Alex Miller (Clojure team)21:07:33

you can't automatically get that (other than by looking at the jira page)

andy.fingerhut21:07:39

I think by watching the JIRA issue.

kenny21:07:50

Right - I used that a lot before. Quite useful.

Alex Miller (Clojure team)21:07:52

you can't watch the jira issue as most people will not have an account

Alex Miller (Clojure team)21:07:01

the idea is most of the traffic will be on ask

andy.fingerhut21:07:35

Well, you know, for the super-elite that get a free Clojure JIRA account πŸ™‚

andy.fingerhut21:07:03

The smiley there was because there is nothing super-elite about it, in case that wasn't clear

Alex Miller (Clojure team)21:07:24

we only get a fixed number of those - we are trying to build a system here for users (without a CA or a JIRA account) to ask questions, register problems, vote on them, etc

kenny21:07:59

It seems important for users to be kept up to date with what is going on in the jira.

Alex Miller (Clojure team)21:07:32

well, that's not a problem we're going to solve right now

Alex Miller (Clojure team)21:07:48

the ask page will have a link to the jira page

kenny21:07:42

Ok. Just voicing that I think that is important πŸ™‚ Also seems like if a jira is created, an ask should automatically get created to ensure users have a way to vote on the jira.

Alex Miller (Clojure team)21:07:07

also not something we're going to solve right now

Alex Miller (Clojure team)21:07:22

relax your hold on jira :)

kenny21:07:53

Haha, I just like following along. Helps inform decisions.

bfabry21:07:15

Alex while you’re removing Jira from my free time could you go ahead and remove it from my day job as well?

carkh21:07:25

i worry about the visibility to the clojure team of issues raised in that forum

Alex Miller (Clojure team)21:07:41

I am watching it like a hawk :)

Alex Miller (Clojure team)21:07:33

I am certain that this will not be the last change we ever make in managing Clojure development

dpsutton21:07:05

move to gitlab confirmed

dpsutton21:07:22

savannah.gnu

dpsutton21:07:31

shudders in freedom

carkh21:07:43

time to switch to CL i guess =)

Alex Miller (Clojure team)21:07:53

clojure's source was in sourceforge at one time, and issues in assembla

Alex Miller (Clojure team)23:07:23

I’m going to take a break from ask and work on spec 2 for a while :)

πŸ‘ 8
Alex Miller (Clojure team)23:07:05

But if someone was real excited about it, I’d be happy to give you a tabular data format to target

borkdude23:07:01

would be cool, maybe even the vote could be preserved

borkdude23:07:24

it seems a fun task for someone who wants to practice their Clojure skills. you could post an issue with specs (!) somewhere and then make a link in: https://clojureverse.org/t/about-the-starter-issues-category/4593

borkdude23:07:58

or just JIRA and then someone will read it on the new QA site πŸ™‚

andy.fingerhut23:07:52

Does SO frown on such scraping and reusing of their data elsewhere, in bulk like that? Link to their official policy in that regard, if anyone knows of one, welcome.