 Good evening Where do you think most of your coders and application I'd say that In the majority of projects I've done I'd guess it's in this line here dependencies It's not actually in the code that I've written or my team is written or a company is written There's a lot more code and the dependencies That forms the execution context of where that code runs so I'm gonna talk about purely about dependencies that relates to build tools, but there's not built tool talk I'm gonna talk about any of the other features So it's something of a a lightning talk The dependencies are If you think about a very important and valuable place you place your code It's without your dependencies your code can't run it can't pass the tests You can't ship to production If your editor can't understand the dependencies that you're using you'll get no support in your IDE or Editing environment for any of your dependencies code So that would be very inconvenient because it would be hard to find doc strings and functions and If you get the dependencies wrong You can a very subtle hard to find bugs like if there's a you have a dependency that depends on another dependency and that version changes That can cause a lot of problems in terms of introduced regressions or different API And also we've had some instances recently that were seen in the MPM world where there were a malicious dependency so someone took over the account of Someone who was publishing very well-known package and compromised like the majority of the Node.js world with with a like a hacked dependency with some malicious code included So I'll just like say thanks to peon2 for learning me the Macbook My laptop at the moment is I've tried swapping to Linux so I bought an HP and that's a multi-week process getting there running Just because the drivers are very difficult with the new hardware. Yeah So I'm part of the flybot team We build video games Mainly for the Chinese mobile gaming market We're very international team as you can see New Zealand Singapore, of course China South Korea And we welcome turkey into the mix with Adam it's a welcome to flybot as well We're happy to have them on board So we're still hiring So anyone interested in Clover and extending the reach of this map Please get in touch or if you know anyone in the community Please let them know So Lonegan was one of the first ways of getting your dependencies in Clover I Skipped over the history before that which was like Reusing Java build tools like Maven It was especially painful and I don't want to get thrown other info showing XML on maybe an XML on the screen But the first real closure built on where it was was Lonegan This is focused on taking away all that pain That'd been before because there really wasn't a closure build tool for going getting your dependencies downloading them and putting them in the class path so you could require them and made that easier first start at least so focuses on automation and declarative configuration so these they can these are the dependencies I want just go get them for me and that looked something like this so the main part here is a description is your Like pom xml metadata is a bunch of other ones you can have plugins as Lonegan's idea of Build tooling extensions, but the main one is this dependencies. So it would go look up your repositories Maven repositories and do dependency resolution on this list. So get all closure Ring and download those versions I think about this because it's the def project macro in line is declarative For example reviews who here uses IntelliJ idea does anyone use IntelliJ? one person few person couple a few people and who uses emacs emacs fans most majority so Emacs has better support in this regard Both emacs and IntelliJ work with this I can tell you you can read this file and it can pull out dependencies because it's just a a keyword and It can go and index those and provide you with a complete So that's that's great problems with line were that when you wanted to extend it you had to go and learn the plug-in API and I Don't even remember that is how to extend it. I've done it before many years ago So it's fine up until for the parts that worked We could write a declarative description of your build and when you want to go beyond that into some customization Things got very complicated very fast You had to go write Plugins that you deployed separately and then you would depend on those from line again, and you'd be have to configure your plugins. So It's very complicated. So People said or builds a program. So let's just write closure code arbitrary code to download our dependencies and configure an environment and provide a convenient shell for doing that and then I Does exactly that so instead of being declarative you actually call mutating functions that Alter the environment. So this is setting the source paths and dependencies again Still dependencies keyword the key difference here is its actual Code in the sense you could put above that like require a database client and then query the database for your listed dependencies and then Just go dependencies is a vector variable. So if You're an IntelliJ It has no idea what this means You get no support for Order completion or someone on your team is intelligent again. No support for That order completion still use a very similar dependency resolution under the hood like in terms of versions and security You can still sign packages. So I'm gonna get and everything like that And you get the advantage of you can start now Right all this code to do custom things and then execute it easily on the front line So Emax I think supported this before IntelliJ did so it wasn't such a big problem for Emax users, but I still some tooling didn't support it very well And the other key point of this is it's still based on the Maven dependency infrastructure So unlike other languages like rust or go you can't just depend on an undeployed artifact that's directly in git She can't just have a git URL and then you have that downloaded and automatically put on your class path So last year, I think it was the 1.9 release for closure They announced as part of core tool steps alpha as a namespace that provides the same dependency resolution you get with line again or Maven or boot You can still provide Maven like Dependency lists and they'll use Maven dependency resolution and repositories download that but you can also do like local file systems Or git dependencies so you can now just put a git hub URL in a tag or a char and You don't need any other build tool you can build You can use an external dependency create one Data file of your dependencies. Sure. So shortly run the closure core command line and without any build tool and you'll have a working environment Which is very cool So it looks something like this We're going back to declarative again. So it's like line again it's just EDN, so you just have an EDN file called depths.edn and you put your paths depths and dependencies and the Format is slightly different because you have to be able to specify whether it's a Maven version Or git URL or something else so it's a Map of maps instead of a vector of vectors But it has essentially the same Information as we've always used and dependency tooling you can also have what's called aliases Which is like you could have a production environment a dev environment a continuous integration environment and you can configure extra paths to be on your class path or extra dependencies as well, which is very convenient for Running through different stages of testing and deployment So we went back around full circle circle again to declarative and with the same problem again that If you want to extend it it becomes I Think quite complicated You basically have to write the build tool From scratch it gives the closure command line Go back to the previous slide, so This is missing something. It's just a CLJ minus a production have an M main And then run tests so I have an M. You can define a entry point like main And then this takes args, which is run tests So you have to like write your own argument handling Which boot and line already do for you and then you have to like wire up like decide how you want to write tasks and like write your own data structures for that and Just raw functions. So there's no you can depend on libraries obviously like F tests sure, but there's no like native tasks or A command line option handling like with boot For so you have to write all that again yourself. So you're back to the same problem with one again that It's fine for the simple case and then as soon as you get to the customization It becomes very complicated again. So there's built tools depths, which is a plugin That you can Depend on and boot which will read dependencies from depths.edn and Then let you use boot for everything else So you can support get dependencies and you can have boot tasks and That so you get the best of both worlds and you also because it's a Depst.edn is now supported by IntelliJ and other tooling you get that a tooling support for your whole team instead of boot which is not supported like a before depths.edn the way that you would Support IntelliJ is that you'd have to Write a task and boot that would programmatically generate a fake linegun file so that IntelliJ could understand The linegun build even if you didn't have a linegun build. So now you can get away with that Do away with that nonsense completely and just have a depth.edn file which is supported by all the tools There's a linegun plugin. There's a boot plugin Emacs understands it. IntelliJ understands it It's very easy to write your own tooling. It's just edn and then if you build extra building build tools on top of that you can use the build tools rather than Having your dependencies hidden away This wealth of knowledge of what your entire application depends on hidden away in a build structure somewhere So that's as simple as this you can just Have a vanilla boot environment and Have the same depth.edn file Even if someone has not provided any boot support at all and run this boot command You can make this easier by including this dependency obviously and Boot build for yourself, but in any project download with depth.edn file if you want to use boot repo or any other boot command You just need the scene corefield boot tools depth plugin and the depth task and Then you can run any other Boot task after that and it would be Class path and everything will be correct according to the depth.edn file So my current recommendation and I'm open to other people's experience about this. I'd like to hear if anyone else is found a better way is That depth.edn is a closure official Supported tool for the PenCy so I think it's good to use depth.edn first if you're writing libraries or projects especially open source also for for commercial in-house and then if your needs are not met by the simplicity of the Collegiate command line tool Use what are the tool that you want that suits your use case and you can use line again You can use boot tool steps You can use your own closure program with an edn reader File reader off disk It's quite easy to extend on as a starting point I think this is the future for a common base of tooling that everyone's build tools everyone's editors understand and that we can Can rely on the one big problem. I would say I've had with Boot tool steps Is that if there's two ways to use it the default way is that it will only Load those dependencies, but it won't Overwrite the boot global dependencies variable So boot will not do Dependency resolution so you can't use like Boot tooling that depends on The dependencies information such as like conflicts or dependency trees or finding updates But every all have a normal tasks that depend on those dependencies will work. That's the default way for Boot tools steps to work You can configure it which I made a mistake of doing for the first six months we used it to replace the dependencies Global setting in boot and that means that Tool steps alpha which is part of closure Will read the edn file it will go through and do a full dependency resolution And it will provide the boot not just the dependencies you listed in depth story And it'll provide a list like a hundred things along like every resolved dependency and dependency of dependency that you have And then if you override Boots dependencies with that it thinks those are your original dependencies not resolve dependencies So it will go and it will resolve all of those hundred dependencies a second time and all the dependencies for those dependencies and then you'll end up getting very slow builds and caching issues so You either have to accept You know build times on CI in excess of 15 to 30 minutes which for me is unacceptable or The boot tooling around the dependency conflicts and finding newer versions being broken Which is an unfortunate trade-off at the moment the other option that I do have which have not released open source is You can just it's only about a hundred lines of code We've got a tool that fully understands dips dot edm file, but doesn't use tools dips alpha to resolve The dependencies it will just transform a map of maps into a victor of victors and as well as that it'll turn The aliases so if we go back to the previous example We've got an alias for production here It'll also turn the aliases Paths and depths into the appropriate boot format So you'll it'll turn this map of maps into a boot compatible dependency vector and we'll turn this map of maps if you say you're on the production alias into From map of maps into vector vector, but it won't actually resolve those dependencies and it'll allow boot to do the Full dependency resolution on that the advantage with that is you get depth to edm you get the boot tooling you get full support for boots dependency conflict and dependency graph resolution handling and You get fast build times so everything's good one downside is because boot is doing The dependency resolution at that point you no longer support get dependencies So if you're interested in the get dependencies, you can't use boot to do the dependency resolution so at the end of the day You can do you can choose whatever advantages and disadvantages you need for your particular case Out of depth story in but you can't have them all at once at the moment as far as I know So that's hopefully resolved with some future work So thanks. That's all I have to say about deep story in any questions Okay Thanks for coming