13 ms·
Please – A Cross-Language Build System
- qznc 9y agoI'd say meson is the most direct competitor. They don't mention it in the FAQ though. http://mesonbuild.com/ http://mesonbuild.com/
- lolikoisuru 9y ago>supported languages include C, C++, D, Fortran, Java, Rust So it isn't general purpose?
- funkythingss 9y agothis looks very interesting! Has anyone used it before?
- napa15 9y agowell I tried but they dont have samples so I gave up, no point in spending hours in reading docs and setting up something for a build system that may be useless. It also seemed suspiciously identical to bazel with really no features that may be special in any way? I mean really, why use this and not just bazel. The webpage doesnt even say
- lolikoisuru 9y ago>well I tried but they dont have samples so I gave up, no point in spending hours in reading docs and setting up something for a build system that may be useless. It also seemed suspiciously identical to bazel with really no features that may be special in any way? I mean really, why use this and not just bazel. The webpage doesnt even say I agree with this guy. It shouldn't be that hard to include an example of an advanced script. https://www.gnu.org/software/make/manual/make.html#toc-Complex-Makefile-Example https://www.gnu.org/software/make/manual/make.html#toc-Compl...
- CJefferson 9y agoCross language but not cross platform -- no windows support, and none planned.
- shoover 9y agowaf continues to be the underappreciated gem in this space: high level build language supporting many languages and tools, cross platform, implemented and extensible in Python, nothing to install (except Python), and fast.
- slavik81 9y agoIt is quite fast and Python is a nice language for specifying the build, but I found waf to be difficult to extend. I had some tests that needed a binary file. That binary file was generated from a text file by a utility program. That utility program had to be built from source. After a week of trying to get that correctly specified, I gave up. I thought I'd found the right way of doing it several times, but each time I discovered the dependency chain was broken in some way. I looked into how official modules that dealt with generated files were implemented, but I found them to be surprisingly complex. By comparison, it was only mildly annoying to do that sort of thing in CMake (the build system I moved to after a year or two with waf). The relative simplicity of CMake was what convinced me to switch. That being said, it's been several years since I last used waf. It may have improved during that time.
- shoover 9y agoI have found the learning curve to be very steep. Extension points are several, subtle, and powerful, leveraging heavily not only normal OOP but also python meta programming. It is not out of the question go beyond all that and monkey patch some core class; I’ve seen this recommended by maintainers in some circumstances. The docs are up front that waf is not a build system but a build system toolkit. For example, there is a demo that uses makefiles as the build language and runs them in waf. Another demo requires no build file but just finds the source files and builds them. But I have yet to see any external project released that says, “This is a build system... built on the waf build system toolkit,” like the Software Construction Toolkit was built on scons. Perhaps the toolkit is so close to being a build system that people just use it as is and require only small customizations, which are kept in their projects.
- egnehots 9y agoThis looks so similar to Bazel.. What's the advantage of using Please?
- thedirt0115 9y agoThere's a section in the FAQ titled "WHY USE PLEASE INSTEAD OF BAZEL, BUCK OR PANTS?" https://please.build/faq.html https://please.build/faq.html
- moocowtruck 9y agoi read that part but the explanation is poor at best... basically they dont like the jvm because. and thats all that they really said
- shoover 9y agoIt's tuned to the preferences of another company; if you prefer their taste on the finer points, that's one. Secondly, it's written in Go, so installation should be simpler.
- iainmerrick 9y agoWhat's hard about "brew install bazel"?
- awalton 9y agoWell, for one, Linux/Windows/Solaris don't "brew"...
- iainmerrick 9y agoApparently Windows doesn't "please" either! :)
- wocram 9y agonix for Linux, and maybe Solaris. Unfortunately Windows is go through instructions.
- pjjw 9y agofavorite thing about it is their use of the pragmatapro font on the website
- rajangdavis 9y agoVery cool site!
- malkia 9y agoPlease bazel, buck or pants?
- iainmerrick 9y agoSince Bazel is a version of the thing everybody is copying (Google’s internal build system Blaze) I would say Bazel is most likely the best of the bunch. I’ve used Buck; it’s slow. I haven’t tried Pants.
- malkia 9y agoI've used blaze for 2.5 years, best build system ever, but haven't used at all "pants please or buck"
- nvus 9y agoNice work, I will try using it on my next project. 404 Not Found WinLover at localhost.
- abiox 9y agois the 404 thing humor? the meaning is a bit unclear.
- ttsda 9y agoThe name is not very google friendly. It took me a bit longer than I would have liked to find examples for my specific use-case.
- _asummers 9y agoI could see them using "plzbuild" as their version of "golang", for the same problem.
- ball_of_lint 9y agoI dislike that the only way they list to install is "curl https://get.please.build https://get.please.build | bash". I know it's fast and easy but it really leaves your computer at their mercy.
- staticassertion 9y agoHow? It's over HTTPS, and you're already trusting them to execute code on your system... and it's not even root... I see no way in which this "leaves your computer at their mercy" more than any other process of purposefully executing code they control on your system.
- anfedorov 9y agoAre there any serious comparisons with package managers versus curl-to-bash? Seems as if there are a lot of trade-offs.
- merlinsbrain 9y agoI agree with the point you’re making and you clearly know what you’re talking about but: I would caution you to use the phrase “no way in which” when discussing security - the less informed may read this and believe it. While an edge case and requiring a mailicious targeted attack in this case there’s at least the possibility of being MiTM’d. The problem - as you’re probably aware - with using absolute terms when speaking about a case like this is that it’s easy to extrapolate this sense of safety to something that may lead to an attack that requires much less precision thank convincing the browser that the MiTM proxy is “please.build”.
- shakna 9y agoA glance inside their shell script shows they don't protect against something as simple as a broken connection. Because curl | bash is vulnerable to partial execution. For the inner downloads in the script, they use the -fsSL flags, which would protect against such broken behaviour. But not their use-facing script. More to the point, the install just downloads: https://get.please.build/${GOOS}_amd64/${VERSION}/please_${VERSION}.tar.gz https://get.please.build/${GOOS}_amd64/${VERSION}/please_${V... then unzips and links it to PATH. No checking the source isn't corrupt, no checking if the tar archive successfully expands. (And the var GOOS seems to depend on an environment variable I don't think is guaranteed to exist. It certainly doesn't on my Mac.) If that's the case... Why not just provide a download link? It won't have the same issue as a broken install if the connection drops, and is just as easy. The only technical bit, linking to PATH, is something the end audience could be expected to know.
- MadcapJake 9y ago> Also we chose the domain name before almost anything else (priorities!). I'm glad I'm not the only one with this problem :P
- millstone 9y agoApologies in advance for shitting on this, but PLEASE STOP BUILDING BUILD SYSTEMS. We already have a serious incompatibility problem with projects using autotools vs CMake vs Meson vs gyp vs Boost.Build vs SCons vs BUCK vs... and now we throw Please onto the pile. It sucks when you find a smallish library and discover it uses an esoteric build system whose dependencies dwarf the library themselves (cough Yoga). The OSS community needs build system consolidation, not tacking on a 15th wheel to the cart. Read the FAQ, it's just bananas: > It [Bazel] is a great system but we have slightly different goals > We preferred [Buck] to other options available, but again we're focused on different goals > we didn't think it [Pants] was the ideal fit for us at the time "All other systems had slightly different goals or weren't the exactly ideal fit, so rather than contribute to or extend them we poured an enormous amount of energy into rebuilding them in a slightly different way." Relevant: http://www.rojtberg.net/1481/do-not-use-meson/ http://www.rojtberg.net/1481/do-not-use-meson/
- iriei283 9y agoPRs welcome This is awful demanding. Not entirely unexpected in tech tho “Why don’t others fix my frustration in open source projects!” they shout with no hint of irony
- pknopf 9y agoThe FAQ basically says Windows can be supported, but only if the community manages it.
- foo101 9y agoPlease don't make such low-effort, insinuating, cliche comments on Hacker News. It makes the reading experience very poor. Consider that the parent comment author might already be making pull requests to the projects of his interest. The snarky "PRs welcome" is therefore unnecessary and unwelcome. Everyone here knows PRs are welcome in an open source project. Some of us do send PRs. But whether someone sends PRs or not has no bearing on whether one can appreciate or criticize an idea as long as it is done in a substantive manner. In fact, whether the parent comment author sends PRs or not is orthogonal to his complaint that we have too many build systems that is increasing the burden on users and maintainers. If you have something to say against this point, please do so on its own merit in a substantive manner without insinuations or ad-hominem attacks.
- EtDybNuvCu 9y agoWhy would I use this instead of Nix?
- pknopf 9y agoDo people use Nix for building and deploying project dependencies? Example project? Can you consume the result in a format that isn't all Nix-y symlinked?
- EtDybNuvCu 9y agonixpkgs contains tools for building Docker-compatible container images with `dockerTools`, and also AppImage-style standalone executables with `nix-bundle`. My project, as well as many other projects, ships its own default.nix for builds. Linking an example would deanonymize this account a little too much, but there's plenty of examples out there.
- bfrog 9y agoMeson and Ninja being adopted by gnome is game changing
- jopsen 9y agoWhy do all these build systems have magic built-in rules and special syntax? Custom languages, etc. makefiles without any magic are comprehensible, but people quickly add magic :(
- aidenn0 9y agognumake has at least a half-dozen magic built-in rules, no?
- lloeki 9y agoA bit more than a half dozen, but mostly inconsequential: https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html https://www.gnu.org/software/make/manual/html_node/Catalogue...
- jopsen 9y agoI said, makefiles without the magic :) If you only use plain rules and maybe simple pattern rules, avoid configure step, etc. Makefiles are simple, pretty and very generic. Why do all other build systems have so much magic? Why not declare rules and input/output in a pure functional manner?
- gkya 9y agoBoth gnumake and bmake have lots of tooling, partly magic, at least for compiling C code.
- ComputerGuru 9y agoSince this thread has long since devolved into a discussion about build systems in general: if you don’t need a build system with Windows support, go with tup which is otherwise awesome. If you don’t care about bloat in your dev tools, go with meson (modern scons replacement). If you need cross platform and don’t like requirements on needless runtimes, I’m still searching for a good replacement for cmake (BSD Makefiles accomplish much of the same with a saner syntax just not as portably unless you need the ninja/msvc/qt/xcode intermediate build files). Premake was promising but I fear it fell victim to early hype syndrome.
- aidenn0 9y agoWhat's wrong with tup on windows? (I've never used it on windows, but its docs say that windows is supported).
- ComputerGuru 9y agoTup requires fuse because they use fuse to monitor the file system for changes instead of kqueue/inotify/FindFirstChangeNotification. Fuse support on Windows is a no-go, very unstable, broken, and unavailable by default.
- gelo 9y agoSo err... where is C# / Mono in all this?
- bringtheaction 9y agoI Googled to find the repository of a build system I wanted to mention and stumbled upon something else that I found interesting; https://shakebuild.com/ https://shakebuild.com/ > Shake is a library for writing build systems. Most large projects have a custom-written build system, and developers working on the project are likely to run the build system many times a day, spending a noticeable amount of time waiting for the build system. This document explains why you might pick Shake over alternative tools for writing build systems (e.g. make, Ant, Scons). https://shakebuild.com/why https://shakebuild.com/why Shake is written in Haskell and is open source.
- carterschonwald 9y agoOne of the larger public projects working to migrate to shake over time is ghc. The current ghc build system uses a recursive make setup, and all that such entails. (:
- lolikoisuru 9y agoWhy are the examples in some horrible slide set instead of just on the website?
- dingo_bat 9y agoIs there a problem with cmake? Why are people still inventing new build systems?
- cimmanom 9y agoBecause make is awkward and not very developer friendly, and it relies on shell scripting, which is arguably even more awkward, hard to learn, and developer-unfriendly. Also, make is very barebones and "close to the metal". Good modern build systems provide libraries of common tasks so you don't have to reinvent the wheel; they can handle parallelism well; and can fall back on makefiles where needed. They let you get more done in less time.
- izacus 9y agoI think you missed the fact that he's talking about Cmake not make. While Cmake can generate make scripts, it can also create IDE projects and some other outputs like Ninja files.
- flohofwoe 9y agocmake cons (IMHO): - the archaic custom scripting language (that's its main problem) - there are many ways to do the same thing, resulting in each (non-trivial) build script looking different - for the above reason, importing dependencies written by somebody else is non-trivial, and its often better to rewrite the cmake scripts completely - it lacks some 'integration features' found in more modern systems like Rust's cargo: (1) proper dependency/package management (2) run targets (3) switching between build configurations should be easier (not just release/debug, also different build target platforms) cmake pros (also IMHO): - can generate IDE project files (that's what most new build systems completely ignore) - very good cross-compilation support - describing a simple build is reasonably simple - broad support for build tools and IDEs
- ihnorton 9y agoMicrosoft (both vscode and studio) seems to be moving toward ide adaptation — parsing output from other compilers, supporting compilation databases and folder-only (non solution) projects. Perhaps this, combined with Clang viability for MSVC ABI, will reduce the impetus for cross-platform projects to use cmake just to support Windows. Of course, there’s added inertia in favor of cmake due to LLVM, Boost, and others moving over. Not to mention that Microsoft now also supports the “cmake server” concept (there will be some deep irony if after 20 years of “we need cmake to support Microsoft” the argument for the next N years becomes “we should use cmake because Microsoft supports it”).
- suvelx 9y agoI have used please, on a project also written by the please developers, of which I am not. While my experience of `plz` may have been mired by the project that used it, I can't say I found it added anything special. It arguably doesn't meet the needs of the `plz` developers themselves, as evidenced by the custom build-rules in the project that overrode the built-ins. And at one point, it was suggested to us that we drop Plz and move to buck/bazel/pants which was suggested would be a relatively simple replacement. Sure, it built stuff, but the general impression was it got in the way, while due to the way it was configured, was essential to keeping the project running. And why are there 20 releases on the 25th of November?
- alexeiz 9y agoWhen it comes to a build system with Python-like syntax, I prefer Waf (https://github.com/waf-project/waf https://github.com/waf-project/waf) to the rest of the competing solutions. It's written in Python, provides excellent support for many build scenarios, but can be extended with Python scripts without any restrictions, and has minimal dependencies (literally, you can supply Waf packed binary with your project and it'll work on all major platforms that have Python).