14 ms·
Hey, I write Java for a living and my build script is just a Python program that marshals a javac call.
by d_burfoot 10y ago
Hey, I write Java for a living and my build script is just a Python program that marshals a javac call.
- qwertyuiop924 10y agoI write scheme not for a living. My build script is a scheme file or a makefile, depending on the project. The build complexity is one of the reasons I stay away from Java: If these people think they need XML for builds, what other needlessly complex horrors have they perpetrated? And that sort of thing. Do you have your buildscript template on github?
- quantumhobbit 10y agoI'm beginning to think that build scripts should be written in the language they are building, or a more expressive language. So many seem to go in the other direction.
- flukus 10y agoI disagree. The worst problems I see with build scripts are that they are trying to do too much, create branches/tags of themselves, be environmentally aware, etc. Limited build tools are a good thing.
- quantumhobbit 10y agoI really do agree that complexity is the enemy, but people keep shoving complexity into build scripts against better judgment. I've given up and would rather deal with a complex ruby script than a makefile of equal intrinsic complexity.
- ashitlerferad 10y agoI disagree. We need declarative build systems instead so building is auditable and doesn't require arbitrary code execution.
- profquail 10y agoSomething like plmake then? (plmake is a build system written in prolog) https://github.com/cmungall/plmake https://github.com/cmungall/plmake
- ashitlerferad 10y agoplmake allows arbitrary code execution during the build.
- Annatar 10y agoNo we don't! GNU Make is exactly what we need; that's pah-lenty declarative in the right hands. All you have to do now is make sure your hands are the right hands. Like buddha said: right mind.
- ashitlerferad 10y agoGNU Make allows arbitrary code execution during the build.
- TeMPOraL 10y agoWhat's the problem with that, exactly?
- Annatar 10y agoYou bet it does, and that's exactly what's needed! What's the problem with that, again?
- qwertyuiop924 10y agoYep. If you're running it for a build, you're running unprivilaged - chrooted, jailed, or zoned if you want to be really safe - and if you're running it for install, than you trust the software in any case. And because makefiles are fairly transparent, you can check what the install is doing beforehand.
- hornetblack 10y agoI've written build scripts in Rust. I take's flippin' forever (relative to shell or make). But at least it has proper error checking. One of the guys working on Redox OS make a library called cake which provides macros for a Makefile style script: https://github.com/ticki/cake https://github.com/ticki/cake
- nickpsecurity 10y agoThat looks nice. It combines strong, static analysis with simple DSL and underlying power in language if necessary. Looks like The Right Thing approach in action.
- mike_hearn 10y agoThe Maven POM syntax might look bloaty to modern post-XML eyes, but it's not actually complicated: a typical POM only specifies the name of the project and its dependencies. The rest is typically all done by convention. It's also purely declarative so ordering doesn't matter. M4 and sh are very concise languages. Nonetheless autotools is orders of magnitude more complex than Maven. You really can't compare at all. At any rate, if you want a more concise syntax there is gradle (but it's a bit slower as it's actually executing a real scripting language) and, perhaps a nice middle ground, a thing called Polyglot Maven which is the same build engine but with a variety of non-XML syntaxes. The YAML one is quite nice: https://github.com/takari/polyglot-maven/blob/master/poms/pom.yml https://github.com/takari/polyglot-maven/blob/master/poms/po... That way you get simple syntax and a simple model, but still with lots of features.
- qwertyuiop924 10y agoAlright...
- emidln 10y agoTo this effect, I use leiningen (which is mostly a frontend atop Maven's dependency management) even when I'm building a Jython or a Java project. If there is something funky I need to do as a build/deploy step, I'd rather be writing it in Clojure than Java, and mostly I just want to paste [com.example/foo "1.5.0"] into my :dependencies.
- GFK_of_xmaspast 10y agoI would much rather deal with an xml file than a makefile.
- Annatar 10y agoXML files cannot be easily processed with standard UNIX tools like grep, sed, and AWK. XML requires specialized libraries and tools to process correctly, making it an extremely poor choice for... well, just about anything. It's a markup format for text, not a programming language. Building software is a programmatic process. No XML please! We're decidedly not on Windows, and since I have the misfortune of fitting such square pegs into round holes, please don't use XML for applications which must run on UNIX. It's a nightmare. It's horrible. No!!!
- qwertyuiop924 10y agoIf you must have structured data, use a lisp program. Congratulations on using a format that was designed to be executable. and if it's a build tool, you better believe it's executable. I suspect that Annatar is a Murray Hill purist (I don't know for sure), so he may disagree with me. Of course, like any real programming language, it's hard to process with regex, but then again, I don't want to process makefiles with regex. And you might have some luck coaxing AWK or the SNOBOL family to parse it, and it would be far easier than doing the same with XML. >please don't use XML for applications which must run on UNIX. It's a nightmare. It's horrible. No!!! I'd disagree with you there. DocBook, HTML, and friends, are all good applications of XML (or near XML), doing what XML was designed for: Document Markup. Seriously people, when you're writing a program in a language that has "Markup Language" in the name, does that not ring any alarm bells?
- GFK_of_xmaspast 10y agoAre you seriously suggesting that you can awk a makefile and get anything useful out?
- Annatar 10y agoWhy would I need to AWK a Makefile, when make will take macro definitions as arguments on the command line?