This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (7)
- # beginners (80)
- # boot (134)
- # cider (11)
- # cljs-dev (5)
- # cljsjs (3)
- # cljsrn (19)
- # clojure (144)
- # clojure-austin (2)
- # clojure-berlin (3)
- # clojure-greece (6)
- # clojure-italy (3)
- # clojure-russia (95)
- # clojure-spec (57)
- # clojure-uk (120)
- # clojure-za (2)
- # clojurescript (71)
- # component (1)
- # css (1)
- # cursive (22)
- # datascript (2)
- # datomic (101)
- # dirac (9)
- # docker (3)
- # emacs (10)
- # events (2)
- # immutant (3)
- # leiningen (2)
- # om (63)
- # om-next (1)
- # onyx (6)
- # pedestal (55)
- # portland-or (3)
- # protorepl (2)
- # re-frame (30)
- # reagent (10)
- # ring-swagger (1)
- # rum (31)
- # spacemacs (5)
- # specter (9)
- # untangled (90)
- # yada (2)
Im looking for advice on the best way to share Spec/Schema definitions across client/server codebases in different repos. Where server is clj and client cljs. Preferably without cut and pasting.
@otfrom - Re above about Open Source & Datomic, that’s avery good point. None of the “serious” Time Series Databases I have looked at / found are Open Source… Have I missed a memo?
@dominicm I've already started implementing in .cljc files. Thought about making it it's own lib but it seems like overkill. I am not that familiar with git subtrees so will investigate. We already use checkouts to share code across two server components but that's causing a few issues however they're more to do with restricting design choices as it's code rather than simply a definition of shared data.
Still learning git subtrees, but seem a big improvement to git submodules, which may have brought me to tears on occasion. With subtrees no real issue so far, but still at the copying and pasting commands from history and the web stage
So, am I correct in saying the suggestion would be create a separate repo for the Schema or Spec def's and use git subtrees to bring them in to each dependent project? Would the Schema/Spec def's be built as a separate jar for runtime deployment?
Sounds like the idea could work and is perfectly reasonable. There is an element of untried tho
@jonpither so separate repo brought into each projects build path via subtrees as well?
you could configure the top level project.clj to have the subtrees src paths in the parent src path, is one approach
OK. The libraries approach would mean we could reply on dependency management tools like lein (or boot if we ever go there) but we'd have to build the schema/spec stuff as both a jar and a .js file.
this (managed dependencies) may be helpful in lein actually for this use case @agile_geek https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L71
LOVE wanted and welcome (in the form of RTs) for this adoption story https://twitter.com/juxtpro/status/819833852390703112
@benedek I know about parent pom's in maven. I didn't know there was a similar concept in lien or am I misunderstanding?
@agile_geek you shouldn't be building to js until you build your project (don't distribute a cljs library in js!)
not saying subtrees are a wrong idea tho. they may be much better than deps. i have not really used them.
@benedek essentially just another way to get files into your project. I'm assuming @agile_geek has no private repo to deploy a library too normally.
@dominicm no, we have private repo's we can do that. I'm just weighing pros and cons
@agile_geek oh, I'd suggest that then. Stick them in a cljc and deploy that. Don't bother with subtrees
wonder what is the diff between subtrees and checkout dirs (just to partly answer myself i guess the former is a git thing and the latter is rather a lein thing)
there is a diff. Checkout dirs there's no way you can tie in the versions. With subtrees / submodules, you are tying the versions of the projs together
i.e checkout dirs depends on the dev grabbing the right version of the source and symlinking appropriately
Subtrees get the other project in a directory. Checkouts let you include them in your build
the tooling for doing packages is a much more trodden path than subtrees to subrepos
@glenjamin I sometimes feel like a dunce and this is one of those times...what are packages in the context of Clojure/Clojurescript?
^^ I only suggested subtrees because I didn't think you had a private repo. Do that first.
@agile_geek we used to have 7 separate git repos and used lein-voom to manage versioning. if you have to have separate repos voom is great, and you can never suffer from mvn cache poisoning
in the end though i used git subtree to pull all the 7 repos into subdirs of a single repo, and now use a combo of boot and lein-modules to manage the build
front-end, back-end, everything all as subdirs of a single repo. it's much more convenient
+1 @glenjamin - but additionally use lein-voom to version it - it builds the git sha into the jar version and will update your dependencies automatically, so you can't make a mistake
I’m not a big fan of shared dependencies where you have to run all apps at the same version and bump them
even for something like shared specs, you’ll want to be backwards and forwards compatible so you can roll out updates incrementally
@glenjamin I'd expect we'd be changing both at same time a fair amount but they are currently two separate repo's with separate build pipelines
is it a backend-for-frontend (BFF) type pattern, or a more general backend API that gets used for a bunch of things on the frontend?
It's actually not really either. Don't want to comment too much on my view of the design. The front end calls more than one backend service to carry out tasks and this is one of them.
http://bpiel.github.io/sayid/ any emacs users want to try this out so I can figure out if I want to port it to vim? :smile:
i gave it a whirl the other day, it had a bit of a problem with multimethods that's now been fixed. Found it really useful actually, will definitely try it out again when i'm back in the right place for it
it’s now basically dry and sunny here - there was a light dusting of snow early doors
@peterwestmacott you're pretty close to here (where here = 'Horsham'). We also had some more snow about 30 min ago
cancelled train — so tried to drive in to manchester — but gridlocked traffic so turned back home… had to abandon my car 1/2 way up our hill. Parked it got out… car then promptly slid at an alarmingly high speed 10m down the hill with the handbrake on... fortunately it slid into some mud and came to a stop instead of sliding maybe 50m down the road
@rickmoynihan you want these, but they are unfortunately illegal in the UK https://www.google.co.uk/search?q=piggdekk&espv=2&biw=1285&bih=1027&source=lnms&tbm=isch&sa=X&ved=0ahUKEwj7ss2akb_RAhUDC8AKHSNACsYQ_AUIBigB
mccraigmccraig: chains supposedly aren’t illegal - if and only if they don’t touch the tarmac… which for all intents and purposes means they’re illegal
both chains and piggdekk do completely shag the tarmac, so it's kinda understandable. scandinavian roads all have two grooves per lane worn into them by the piggdekk
anyone got anything good to say about a js graphing libs for a re-frame/reagent app ? @otfrom ?
@rickmoynihan Chains are effectively illegal in the UK? Interesting. We have a freeway here up over the mountains where chains are required by law when it even snows a little, and yeah they mess up the roads pretty badly.
Well they are legal. They’re just practically useless for me. I live in the Peak District National Park at the top of a dirty great hill with a steep narrow single track road for access, so for England we get a huge amount of snow (i.e. we had 6ft drifts of snow in April a few years back)… but a few hundred feet of altitude makes a lot of difference. So today I really could’ve used chains, but legally I’d probably have to remove them after driving a few hundred feet. When we had 6ft drifts I’d probably have driven 1.5miles before I’d need to have removed them - so basically not the worth the hassle.
I suspect if you lived in Cairngorms you could probably legally drive with them for about 1/2 a week a year - so long as you didn’t drive more than maybe 10 miles, and they’d not sent the gritters out
@rickmoynihan when i lived in norway my in-laws had a quattro which they used to put just-rubber winter tyres on (no spikes like most cars use) - it coped pretty well - that would work fine in the UK
@glenjamin they make a lot of difference on a 4wd... especially if it has traction control. not so much on a 2wd
I should probably get some; but it’s a lot of money fitting two cars with them for the 3 weeks a year you need them
usually those weeks we park the cars at the bottom of the hill and walk up and down
We carry chains in our Prius all the time, on the off-chance that we go over a mountain pass on the way to/from a cat show in the winter and they have chain law in effect. I’ve used them maybe three times in 15 years. They do it here (California) mostly to slow drivers down, otherwise Californians would drive like idiots in the snow :slightly_smiling_face:
@mccraigmccraig: I read an article last year about a 2 wheel drive on winter tyres getting up snowy Llamberis Pass where Land Rover Discos with typical off road tyres couldn't.
@paulspencerwilliams could be - i've had very variable results with 2wd and piggdekk (winter tyres with metal studs, more capable than just rubber winter tyres) - had one car which was great and another which was useless. i think it might be related to rear vs front axle drive, rear being better
@rickmoynihan: hey, where do you live? I'm just south of Derby but spend loads of time in Ashbourne, and mainly Edale / Castleton.
@paulspencerwilliams ah, could also have been that the fwd car was an automatic too... can't rightly remember, it was a while ago
paulspencerwilliams: I’m not over that way… I’m at the northernmost tip… Marsden
I've never been up that way. Do you get out on the hills much? I've a mountain bike coaching day at Grenocide next Friday; I hope it thaws!!
though I don’t really travel much to other hills/walks, because when it’s literally your garden why drive anywhere?! :slightly_smiling_face:
yeah - unfortunately we’re renting… but we love it so much that we’ve been delaying getting on the housing ladder… so ultimately probably a stupid thing to do
places like this dont come on the market very often, and when they do they’re usually out of our budget
@glenjamin: yeah, proper trails up there. Did one before xmas in preparation for race season.
Grenoside and Whernside. https://www.youtube.com/watch?v=e1trSakBQLM&feature=share
i’ve been meaning to point my road bike over in that direction and ride the TdF routes