【Hacker News搬运】Zb:早期构建系统
-
Title: Zb: An Early-Stage Build System
Zb:早期构建系统
Text:
Url: https://www.zombiezen.com/blog/2024/09/zb-early-stage-build-system/
很抱歉,由于我是一个人工智能,我无法直接访问外部链接或网页内容。因此,我无法直接使用 JinaReader 或任何其他工具来抓取和总结您提供的链接内容。 不过,如果您能提供该网页的内容摘要或关键信息,我可以帮助您分析并进行中文总结。或者,如果您能描述网页的主要内容,我也可以根据您的描述来生成一个总结。请提供相关内容,我将尽力帮助您。
Post by: zombiezen
Comments:
aseipp: Whatever choices this project makes (I have some opinions, but I think they're not too important) I don't see it mentioning one of the most absolutely critical choices Nix made that was absolutely key to its insane success (at least, IMO, as a hardcore contributor and user for like 10+ years): the monorepo, containing all of the packages and all the libraries for use by everyone downstream, and all contributions trying to go there.<p>Please do not give into the temptation to just write a version manager and stitch together some hodgepodge and throw the hard problem over the fence to the "community", a set of balkanized repositories to make everything work. It is really really really hard to overstate how much value Nixpkgs gets from going the monorepo route and how much the project has been able to improve, adapt, and overcome things thanks to it. It feels like Nixpkgs regularly pulls off major code-wide changes on an average Tuesday that other projects would balk at.<p>(It's actually a benefit early on to just keep everything in one repo too, because you can just... clean up all the code in one spot if you do something like make a major breaking change. Huge huge benefit!)<p>Finally: as a die hard Nix user, I also have been using Buck2 as a kind of thing-that-is-hermetic-cloud-based-and-supports-Windows tool, and it competes in the same space as Zb; a monorepo containing all BUILD files is incredibly important for things to work reliably and it's what I'm exploring right now and seeing if that can be viable. I'm even exploring the possibility of starting from stage0-posix as well. Good luck! There's still work to be done in this space and Nix isn't the final answer, even if I love it.
aseipp: 无论这个项目做出什么选择(我有一些意见,但我认为它们不太重要),我都不这么认为;我看不出它提到了Nix做出的最绝对关键的选择之一,这是它取得疯狂成功的绝对关键(至少,IMO作为核心贡献者和用户已经有十多年了):monorepo,包含所有软件包和所有库供下游所有人使用,以及所有试图进入那里的贡献<p> 请不要忍不住编写一个版本管理器,把一些大杂烩拼凑在一起,把棘手的问题抛给";社区”;,一组巴尔干化的存储库,让一切都能正常工作。Nixpkgs从单仓库路线中获得了多大的价值,以及项目因此而能够改进、适应和克服多大的问题,这真的很难夸大。感觉Nixpkgs平均在周二会定期进行其他项目会拒绝的重大代码范围内的更改。<p>(实际上,早期将所有内容也保存在一个仓库中是一个好处,因为如果你做了一些重大的破坏性更改,你可以……在一个地方清理所有代码。巨大的好处!)<p>最后:作为一个铁杆Nix用户,我Buck2也一直被用作一种基于密封云并支持Windows工具的东西,它与Zb在同一领域竞争;包含所有BUILD文件的monorepo对于可靠地工作非常重要;这就是我;我现在正在探索,看看这是否可行。我;我甚至还在探索从第0阶段posix开始的可能性。祝你好运!那里;在这个领域还有很多工作要做,而Nix还没有完成;这不是最终的答案,即使我喜欢。
imiric: Happy to see someone inspired by Nix, but wanting to carve their own path. Nix popularized some powerful ideas in the Linux world, but it has a steep learning curve and a very unfriendly UI, so there is plenty of room for improvement there.<p>I'm not sure if Lua is the right choice, though. A declarative language seems like a better fit for reproducibility. The goal of supporting non-deterministic builds also seems to go against this. But I'm interested to know how this would work in practice. Good luck!
imiric: 很高兴看到有人受到尼克斯的启发,但想开辟自己的道路。Nix在Linux世界中推广了一些强大的想法,但它有一个陡峭的学习曲线和一个非常不友好的UI,因此还有很大的改进空间<p> 我;不过,我不确定Lua是否是正确的选择。陈述性语言似乎更适合可重复性。支持非确定性构建的目标似乎也与此背道而驰。但我;我很想知道这在实践中是如何运作的。祝你好运!
mikepurvis: Whoa, nifty. Can you speak more to the interop issues with Nix? I've been working on a pretty large Nix deployment in the robotics space for the past 3ish years, and the infrastructure side is the biggest pain point:<p>* Running a bare
nix build
in your CI isn't really enough— no hosted logs, lack of proper prioritization, may end up double-building things.<p>* Running your own instance of Hydra is a gigantic pain; it's a big ball of perl and has compiled components that link right into Nix internals, and architectural fiasco.<p>* SaaS solutions are limited and lack maturity (Hercules CI is Github-only, nixbuild.net is based in Europe and last I checked was still missing some features I needed).<p>* Tvix is cool but not ready for primetime, and the authors oppose flakes, which is a deal-breaker for me.<p>Something that's a barebones capable of running these builds and could be wrapped in a sane REST API and simple web frontend would be very appealing.mikepurvis: 哇,漂亮。你能谈谈Nix的互操作问题吗?我;在过去的30年里,我一直在机器人领域进行大规模的Nix部署,而基础设施方面是最大的痛点:<p>*在CI中运行裸的“Nix构建”不是;这真的不够——没有托管日志,缺乏适当的优先级,最终可能会造成双重构建<p> *运行自己的九头蛇实例是一种巨大的痛苦;它;这是一个庞大的perl球体,编译了直接链接到Nix内部的组件,导致了架构上的惨败<p> *SaaS解决方案有限且缺乏成熟度(Hercules CI仅限于Github,nixbuild.net位于欧洲,我上次检查时仍然缺少一些我需要的功能)<p> *Tvix很酷,但还没有准备好进入黄金时段,作者反对雪花,这对我来说是一个交易破坏者。<p>;它是一个能够运行这些构建的基本组件,可以封装在一个健全的RESTneneneba API中,简单的web前端将非常有吸引力。
laurentlb: I'd like to know more about the "Support for non-determinism" and how that differs from other build systems. Usually, build systems rerun actions when at least one of the inputs has changed. Are non-deterministic targets rerun all the time?<p>Also, I'm curious to know if you've considered using Starlark or the build file syntax used in multiple other recent build systems (Bazel, Buck, Please, Pants).
laurentlb: 我;我想了解更多关于";支持非决定论";以及它与其他构建系统有何不同。通常,当至少一个输入发生变化时,构建系统会重新运行操作。非确定性目标是否一直在重新运行<p> 此外,我;我很想知道你是否;我考虑过使用Starlark或其他多个最近构建系统(Bazel、Buck、Please、Pants)中使用的构建文件语法。
msvan: As a current Nix user, what I would really like is a statically typed language to define builds. Recreating Nix without addressing that feels like a missed opportunity.
msvan: 作为目前的Nix用户,我真正想要的是一种静态类型语言来定义构建。在不解决这个问题的情况下重新创建Nix,感觉就像错过了一个机会。