Fork me on GitHub
#untangled
<
2016-05-06
>
currentoor00:05:38

I don't see it in the http-kit docs. http://www.http-kit.org/server.html

tony.kay00:05:25

@currentoor: might be a vestige from a different server...Jetty?

currentoor00:05:36

yeah looks like it

currentoor00:05:44

hey while you're here

tony.kay00:05:48

That code might have gotten copied in from somewhere

currentoor00:05:55

im about to push up a PR

currentoor00:05:14

but i was thinking do you want to have a :server section in the config.edn?

currentoor00:05:22

like :datomic

tony.kay00:05:31

like, put port in there?

currentoor00:05:35

or just have all the http-kit fields at the root like port

currentoor00:05:59

these fields `[:ip :port :thread :worker-name-prefix :queue-size :max-body :max-line]`

tony.kay00:05:02

the whole thing is the "server" config

currentoor00:05:12

oh right ok at the root then

currentoor00:05:17

just like port

currentoor00:05:42

do you have any requirements on commits?

tony.kay00:05:48

Right...anything that is not specific to the server might move to root

tony.kay00:05:00

so, if supporting IP, perhaps that moves?

tony.kay00:05:28

I would prefer a squashed single commit in the PR...easier to deal with in history

tony.kay00:05:01

Are you making the "defaults" for these a bit more aggressive?

tony.kay00:05:14

or not even passing them if unset?

tony.kay00:05:24

also, it might be nice to validate things and give decent error messages...even better: info logging messages when they are overridden so ppl can see them being set at startup

currentoor00:05:47

I did not touch the defaults, but I'd be happy to set them at whatever you prefer.

currentoor00:05:08

I'm logging the options that ultimately get passed to http-kit. Is that sufficient?

currentoor03:05:15

Maybe it makes sense to set them at the same defaults as nginx?

currentoor05:05:17

hmm lein checkouts doesn’t appear to work for clojurescript projects, @ethangracer any suggestions here?

ethangracer15:05:45

@currentoor: I’ve used lein checkouts in clojurescript a bunch, not sure what issue you’re running into. The way I’ve done it most recently is by making a new cookbook project, and then putting a checkouts/ directory in the same directory as the project file. Then I’ll set the untangled-client version in the project file to the latest snapshot, and run lein deps so there’s a copy of the snapshot in ~/.m2. The last step is to create a symbolic link in the directory to the directory with the untangled-client project file.

ethangracer15:05:03

there does have to be a copy the snapshot that you want to checkout in your local .m2, even though leiningen won’t actually use it

ethangracer15:05:23

lein jar
lein pom
lein localrepo install -p pom.xml target/project_name-version.jar project_name version

ethangracer15:05:47

^^^ you can run this from the untangled-client repo to make and install the dependency directly from the source code if the latest snapshot isn’t on clojars

mahinshaw15:05:34

@currentoor: You also need to make sure that the checkout src dirs are in your src path for cljs builds. ie :source-paths [“checkouts/untangled-client/src” …]

currentoor16:05:22

@ethangracer, @mahinshaw: thanks, i’ll try these later today, also this was a little non-obvious to me, should we document this somewhere?

currentoor16:05:36

an contribution section in the wiki perhaps?

ethangracer16:05:42

we could put something about publishing to a local repo for sure, can’t hurt

mahinshaw16:05:01

Yeah, I think that’s a good idea. @ethangracer Do you have a preference on the repo for generic docs, because this isn’t specific to one project

mahinshaw16:05:17

I am thinking just link to the untangled web repo

ethangracer16:05:40

@currentoor: is there anything I described about checkouts you didn’t see in the leiningen tutorial doc? I know mark’s piece isn’t in the leiningen doc

ethangracer16:05:12

@mahinshaw: maybe a docs folder in the untangled project?

ethangracer16:05:24

we should probably check in with tony

mahinshaw16:05:39

We also need to note that when doing clj/server stuff that there checkout source needs to be in the (set-refresh-dirs …) else they will not reload.

currentoor16:05:43

the lein docs only told me to make the symlink (which worked for untangled-server) but not any of the other stuff you two mentioned

mahinshaw16:05:19

yeah, the lein docs don’t cover some caveats

currentoor16:05:36

and you can add any other stuff to the contribution docs as well, like squashed commits and link to issue(s)

mahinshaw16:05:10

@ethangracer: Tony is in a meeting. We can ping him about it in a bit.

currentoor16:05:18

you guys were plenty helpful but as a boot user i had no idea about any of this

ethangracer16:05:43

yeah, it’s definitely finicky

mahinshaw16:05:44

ahh, boot. I like boot. has it been successful with untangled.

currentoor16:05:44

also i doubt most average lein users even know about this, but i could be wrong

currentoor16:05:06

@mahinshaw: oh yeah works like a charm

ethangracer16:05:32

it would be sweet to have a tutorial on how to set up with boot

mahinshaw16:05:33

I need to do a simple app with that some time. I really liked using it for pet projects last year

ethangracer16:05:44

for those users who prefer it

mahinshaw16:05:50

Maybe we can add some stuff to the cookbook about using boot

currentoor16:05:09

@ethangracer: do want me add a cookbook? we’ve built our app using boot and untangled already

currentoor16:05:31

using untangled-{web server datomic}

ethangracer16:05:37

sounds like you know the most about it, that’d be great

mahinshaw16:05:20

@currentoor: Did you try the boot checkouts task?

adambrosio16:05:24

wrt publishing a local version i wrote this:

#!/bin/bash
set -e -u

# Created publish-local script that publish the repo to your ~/.m2/repository
# using your projects name and current version
# It assumes that you are:
# - in the same directory as the project.clj
# - the project name and version string are on the first line

project_name=$(head -n 1 project.clj | cut -d' ' -f2)
simple_project_name=$(echo $project_name | sed 's/.*\///')
version=$(head -n 1 project.clj | cut -d' ' -f3 | sed 's/"//g')

lein jar
lein pom
lein localrepo install -p pom.xml \
         target/${simple_project_name}-${version}.jar \
         ${project_name} ${version}

adambrosio16:05:09

i’ve tended to use that script more often then checkouts, but (checkouts) still comes in handy that I want to write (or fix) a link-checkouts script

currentoor17:05:08

@mahinshaw: yeah i’ve checkedout that task (see what i did there 😄)

mahinshaw17:05:53

was it usable for your case?

currentoor17:05:42

i was about to use it but then we just added an example project within the lib so i just used that

tony.kay22:05:56

@currentoor: I'm totally game for a CONTRIBUTING.md file in untangled (the top-level project that has the website in it)

tony.kay22:05:27

I should probably write a bit of that, but if you wanted to make it, put in the checkouts stuff, and issue a PR it would motivate me simple_smile

tony.kay22:05:06

FYI: I'm on vacation next week. I will try to check in some, but I'm going to be mostly out of touch.