-
Website
http://brizzled.clapper.org/ -
Original page
http://brizzled.clapper.org/id/87 -
Subscribe
All Comments -
Community
-
Top Commenters
-
mattbriggs
4 comments · 1 points
-
Ray3
1 comment · 1 points
-
Brian Clapper
55 comments · 1 points
-
breton
2 comments · 1 points
-
andrewziem
1 comment · 2 points
-
-
Popular Threads
-
Brizzled: Scala and Python: An informal TCP performance benchmark
6 days ago · 1 comment
-
Brizzled: Scala and Python: An informal TCP performance benchmark
I've only used Ant in a few projects, but it seriously sucks. It's hard to debug, has crappy error messages, is awkward to extend, has ugly, inflexible XML syntax. I find it much easier and faster to write build scripts in Java or Scala, so I would definitely take a look at your build tool.
I think you are correct on the build language requirements and Ant only does #1 reasonably. At #2 it sucks like a black hole.
Off topic. I started to ask you, "What tools you use to create your blog and discussions?" but, (I'm a geek.), I just figured it out.
Schmant definitely looks interesting. However, Scala isn't (strictly speaking) a scripting language; it's a compiled language. I may find uses for Schmant, but I'm still going to implement this tool, even if it never gets used by anyone else, because it's an excellent exercise for bringing myself further into the Scala world.
Thanks for the tip, though. I've bookmarked Schmant.
I think I'll continue to build the one I'm building, mostly because it's serving as a perfect platform for delving into various aspects of Scala--including Actors, which I'm using to parallelize the build process. When I'm teaching myself a new language, having a well-defined, real project to build is ideal and beats writing small test programs here and there. I'm also looking to build something I can use in my Java-only projects, so it should build more than just Scala projects.
But I believe I'll switch to SBT to build it, until it can build it with itself.
Thanks to both of you.
Build scripts should be written using real languages. I really like what buildr does http://buildr.apache.org/ The only drawback of this solution is a speed - for huge project it works very slow. If you make something similar but faster - that would be killer tool.
It's a piece of work.
I can recommend you look at it, especially the sort of two-phase lifecycle it has, where first builds a di-graph of targets BEFORE any are executed. The script can generate or modify tasks and dependencies on the fly, and when it's all done, you get a chance to look at the graph before execution. Also it uses apache ivy natively for dependency mgmt, although it has a groovy dsl to configure it if you're XML averse (as I am).
All configured in pure groovy code.
Now a system that was similar, but configured in SCALA, and which in addition takes advantage of scala to be as parallel as possible, now THAT would be sweet.
LIST = foo
LIST += bar
when I start to see folks implementing build systems like scons, and rake that use the native language syntax to express the recipe, I become concerned that they are really scripting the recipe and not defining the recipe
One of my favorite things about 'make' is the multiple pass thru the recipe to support interpolated macros, and exactly the opposite of ant/maven and that is mutable properties.
Every build system I've worked on where the developers started going outside the declarative and into procedural coding, the build system turned into a rats nest that nobody else on the team wanted to have anything to deal with.
having said all that, I'd love to see a build system implemented in scala, but designed/implemented with right reasons behind them. Often all I see from the author is a description of symptoms they are solving. What is needed is a paradigm change, not just more rehashing of the same old junk
Being able to escape to real code, when necessary, is helpful. Sure, someone will produce hairy crap because they have access to that much power. But they'll produce hairy crap with "make" or Ant, too. If the situation calls for actual code, I'd like to have access to an actual programming language.
But build systems are generally a mess because of a lack of good examples available to learn from and people not dealing with the fact of a bad data model requires oddities to occur to operate on that data model
1) bad data model. generally speaking native source trees in commercial companies are poorly designed and rarely take into account the entire product life cycle. this leads to the problems Martin and others run into needing all kinds of 1-off solutions to produce a build. For example, suppose nothing changes in the source code, but the dependencies change, can the build system handle that without branching or modifying the build system
2) Ant and Maven are weakness is due to an very very narrow usage focus. Because of this focus and because they are the status quo, people are not learning much by using them, only that they do not do what is needed (and mostly what is needed is a reaction to a symptom). So in many ways because our build tools are weak so is our understanding of build systems.
3) Many java projects cannot fit in the maven model and the ant stuff is way to brutal in xml and also its really a poor design to begin with. I worked on one team that developing software to run on set top boxes (interestingly enough... javas initial target) and it was so painful using Ant to implement the build system. There is one good thing I can say about Maven and Ivy... the dependency management is good.
In regards to your latest statement about having to use actual code, I agree 100%. How that is done is the difference between what generally ends up being very sloppy build system or elegant (which should translate into easy to maintain and extend). I like to work with teams to completely separate targets, properties, and code which allows users and maintainers to focus on the specific logic of the build system versus, configuration of the build system, or supporting tasks (code snippers), instead of unraveling
In summary, when I define/implement build system, my main focus is removing the odd, local build weirdness. Mostly this oddness occurs for these reasons:
* the build system was difficult to understand and the developer needed to deliver their technology (primary focus) and in a flash put in something to keep progress moving forward
* the build system is much like a wiki and that is it often not owned by anyone, no specs, no best-practices, its just a unmanaged container that somehow produces a result
* the person assigned to developing the build system operated in much the same way agile teams do, and that is with a narrow focus on the goals of the team in the immediate and near future, and then iteratively add support. but generally fundamental flaws are established with initial instance and we pile on more tasks for the build system in rapid fire.
* garbage in, process garbage, maybe something useful as output.
The best thing we could do, is as a community establish a place on the web to describe the problems, symptoms, exceptions and approach to this problem. The solution would not be a build system, but instead of collection if libraries, utils (a toolbox), from that build systems would be implemented.
How simple can a native build system be... All targets are dynamic as follows and maintain in its own file lets call that targets.mk. Then we'll need another file to contain all the properties, properties.mk. The approach with that file is to define 3 categories of properties: little tuple, big tuple and common properties. The tuple type properties are used to group properties along platform, toolchain and other variants. The next file we'll next is responsible from resloving the properties into the variables used in the tarket.mk file. What we've done is separate the build system into 3 major pieces (targets, properties, resolver). This approach requires very few 'make' statements/commands. It support unlimited toolchains, chipsets, languages, etc... This is what I call a variant/relocatable based build system. Almost impossible to do in a simple manner with Ant and Maven.
$(OBJDIR)%.c: (SRCDIR)%.o
$(DOT_C_DOT_O_RULE)
$(LIBRARY): $(OBJS)
$(LIBRARY_RULE)
$(EXECUTABLE): $(OBJS)
$(EXECUTABLE_RULE)
As soon as I see a target like libfoo.a I no that build system is rigid and will not respond to have the company does business, where they do it, etc.. without someone hacking on it.
So... A build system implementers, why don't we remove the odd and build weirdness? And why don't we work with build technology designers to have a better perspective of the problem?
Regards -- Kramer