scala.bythebay.io: Alexandre Archambault, Easy dependency management with coursier
Recording: scala.bythebay.io: Alexandre Archambault, Easy dependency management with coursier
so hi everyone so that about course a which is a library and a bunch of tools to manage dependencies so in that talk I'd like to first discuss what were the motivations for writing it then I'd like to discuss what are the goals for it's a 1 0 final version which hopefully will happen in a matter of weeks and then I'd like to discuss the kind of applications that can be built on top of it so what we wanted a bit to Shabbas so and the other of course II and also of jupiter's Cara but I'm talking about tomorrow and I'm working at a company called did the TV which does a native video advertising so the course is robbery to to manage defenses and roughly this can I repair this kind of reverence consisted to two big components that ISM we have one under one and it works a dependency graph that is it goes from one dependency to the other while at the same time reconciling versions or hunting exclusions and these kind of things and on the other end it downloads and cache things that is metadata and jaws so only one and we have some basically some data domain modeling that is Kara is quite well suited to to 200 and on the other end we have some IO and cash management and so one of the goals of course was to do a library to manage expenses that clearly separates these two concerns and the aim of that is to make it easier to add features to to both of these two things that is under one and for the domain willing staff one of its goal was to to to have a really really simple resurgence that is I mean principal resolutions across platforms that is not not something that would that would use some that would check some system properties under the hood and behave differently depending on what it finds here the graph or say was read to be referentially transparent then on the other hand about donating and cashing stuff one of the the goal of making that better was to first enable parallel downloads that is being able to denote metadata and just in power also when when of the goal was not to have I mean not to require some cash white lock I like having I guess we all run into the global racks in SBT and one of the cores of course he was not to require this kind of rocks so when we tween this part we can also have some and we can also manage to have some and offline mode I mean we which I mean we never know it to one of ETA what so so basically so Corsa consists in at the very core of course a is a robbery that is it consists of two models corresponding to two concerns just before so the first one is the car to car model which with the domain building staff and cash under Zordon caching and the running stuff and so do this very car is already already has a huge early adopters so for example divisible which is a bridge between the is urban language and and scanner written by los Apple uses uses course a torii which is a Jupiter cannon for first pack uses Corsa to other defensive and the Tori which is part of the Apache equator Jupiter's carotid IO third or so is this course a and scatter fader which is a which is a web UI - runs Kraken or so it is kursi to add dependencies on the frame so the the component of course a that is the most used if I think it's SBT plugin so at first way it was written so here so we see it first the learning of metadata then a bunch of of just and so insight was returned to to just check that the robbery was working fine then quickly become the main driver for its other plan and gaining memorial service yeah it returned to to unveil lots of missing features in Corsa which which were added in the return and so basically that that postponed the 1 0 is of course a but but I'm concerned that it will it will it will octa the 1 0 final will will be written in a few weeks so so we had this particular can write on the cache of course he so basically this cash as new groom barracks I just I mean when you use BT plug-in or a dozen and first aid course he doesn't require any kind of global rocks but nonetheless sometimes depending on the keys of his be that we use we can run it to some global rocks but when course it doesn't enforce any anyone so so yeah it does understand I seen a flight mode that is course addressed use some time to live and so basically just by setting the time to do to large value we can can go offline and also cannot that the cash of course a doesn't for exactly the same the same as it doesn't have the same kind of path then the one under IV cash that is course adjust the clinic's the urs it puts in cash in its own path for example this is the path of the sky robbery in Corsa cash and one question that that arose it so some some people proposed that course the Corsa cash for the x DG DG convention and RN X or OS specific intentions to put a cash so it is still an open question that options that work on that principle so we're last big component of course it is it's function so this is a very clear common a tool that allows to launch simple applications that is recurrent for example kara format yeah this command or we can launch ammonites get this one and what this does is it this fetches the classpath scones just throw them in the class pass and rotate that so basically what this specialist to do is a public we can publish applications a simple library and then just use the ruler of course here to launch the applications this way so that way we don't have to you know to to create assemblies or or to publish applications via archives and then we having to enter way to distribute them when you can just finish things like libraries and launch them this way so currently my stones are being raised it already has 12 contributors and so missing teachers are getting added underway and 3 1 0 is is around the corner so now I'd like to quickly talk about the applications that can be built on top of that so so I just show you I show you did before how course it could launch applications made of dependencies and so that was something like this they're actually having this is a bit cumbersome to type that is we have to you to type an organization and with the name in the version they're actually move that would be most straightforward ways to do that and one of them would be using this context so this is a bit experimental currently or if this is a Nokia on the course here and github of course but basically when this PR or else is just don't a concussion yeah this kind of gone that is a yeah we will just we just give a name to course a ranch and what questions does it it looks up soon as context for this name and the sky index no to actually get approval stories of this name it knows the corresponding nipple dependencies and that way course I can't get the course many defenses of that and just flourish manager so that arose to to easily launch an application just out of its a tourism so another great vacations which is on the same here if when we add the class pass of the applications launched this way are computed on the fly we can also on the fries substitute some charts for other that is for example we can swap the maintenance class by the ones from top level and that wafers operate this command I was to lunch am night with my soliciting mask mascara by the one from Tiger in that way we launched a night with natural types never obviously the various fixes from from a tabular scar our last last big application is just before I show you how to run applications locally now if I just substitute proximate lunch we actually get to wait to launch spec applications that so here basically I published a spark application on a story it's this one my course buxom it's of this job and course enables to launch this application yeah yes back so now we must add a few options for polities after twelve times we add options for proximity so people who use plasma to know that we specify the number of machine remotely strong and after two iPhones again we can arguments for our application and that way that course is back to me that's all origin from here that is you know so that when we launch Spock education basically the usual way and three three cans path back involved that is we basically have our application Casper here we have to grasp at that come from the spy solution here and course is possum it actually under Oregon properly that is we don't have to memory manager swallowed up to manually manage is practice efficient and so that the root to root speculations in your wrist right away without having to manage a zombies or spy stations so now other so what i'd show you to the for israel to current master of course a it's not it's I mean it's really matter it is being it's a new set my company but it's it's still bit rough around the edges [Music] now other featureless woodland Corsi after one day room for example hot burning that is when we launch an application it can be a web server using let's say he4s or Finch which don't under not really Natalie and but if we launch them via Corsi Corsi could actually under the hot reading part that is it could when you launch an effusion this way it could watch the questioning yourself attack you know just in a video card or just from from snap locked repository and if if Corsi see that one of them changed it can interrupt web server and launch it again to that arrest who to add a 3d to rebury that don't not already on the road alright so another thing that we nice time is being able to launch SVT with the course it counts right now because SBT I mean isn't that true straight right orange I mean for a bunch of logic need but it's a big you know beam is real treat and it will be a to be equal together to that at least who - of course it Arnold the classpath Savas Beatie in power and less drama because it can be quite painful currently also among the changes that could happen after one zero hour it could get a person API that is for now it's Apple is a bit rough it's a bit low level and to be nighttime some user acts asked for a person API to be able to more easily we were to more easily - the burnses also for night uses CARICOM current but it could switch to either FS - our cats press mics in the future okay so that's it so this is its website and you have questions okay yeah and you mean just replace Avera by Corsi or oh yeah you can to reconfirm the cache it's by default it uses some semen yeah sorry yeah so the question was can we were in better could we repeal a third by Corsi and in particular can we specified the the cache directory of it so the answer is yes I mean it's a little bit in the readme and you can also for example if you're using cozy from the command line you can set the courtesy cash on the arm enviable and not it would automatically switch to it whatever but it's a super solid API I mean good for you okay okay so thanks for your attention [Applause]