TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What's New in Bazel 6.0

69 点作者 siggi超过 2 年前

6 条评论

nisa超过 2 年前
I&#x27;m still not sure if I should go the bazel route... recently found a long good explanation why anki switched away from bazel: <a href="https:&#x2F;&#x2F;github.com&#x2F;ankitects&#x2F;anki&#x2F;commit&#x2F;5e0a761b875fff4c9e4b202c08bd740c7bb37763">https:&#x2F;&#x2F;github.com&#x2F;ankitects&#x2F;anki&#x2F;commit&#x2F;5e0a761b875fff4c9e4...</a><p>I&#x27;d love to have cachable builds but I wonder how much effort it takes to maintain such a setup - especially in a small team very far away from silicon valley or google were nobody saw bazel before. Would be a perfect fit for my former company but even there I couldn&#x27;t convince my colleagues - they build a monster using maven which would be more elegant in bazel but maven integration worked different than the maven algorithm at least 2 years ago...so my PoC turned into reading source code of dependency resolution algorithm in the used scala tool coursier... in the end I had to give up after patching maven issues in several projects we build upon - something nobody is willing to do I guess - to be fair I tried to incorporate Alfresco ECM which is quite an enterprise Java monster on it&#x27;s own.<p>Also I couldn&#x27;t find a good approach to use multiple git repositories almost all tutorials use a monorepo.
评论 #34056239 未加载
评论 #34055970 未加载
评论 #34055991 未加载
评论 #34056492 未加载
评论 #34057720 未加载
评论 #34056171 未加载
评论 #34056644 未加载
评论 #34055848 未加载
Leherenn超过 2 年前
We use Bazel at work for C++, and while defining targets and dependency is easy, I&#x27;ve really struggled with some stuff I would consider basic, like conditionally changing build flags, especially to external dependencies.<p>Basically, I wanted to conditionally use sanitizers for a specific target and propagate the sanitizers compiler&#x2F;linker flags to the whole dependency tree. For code you own, from what I could find, you need to duplicate each target and each dependency (and their own dependencies) for each possible sanitizer and then select the right one. And for external dependencies, you need to use &quot;Aspects&quot;, if I understood correctly, to modify the build dependency graph and inject your flags. There&#x27;s a question on stackoverflow about it, but the answer is very high level (presumably by a Bazel dev), and unfortunately I didn&#x27;t have time to dig it further and just abandoned.<p>I also had a lot of issues on an ARM Mac, including the linker issue that is apparently fixed (hooray) and recurrent crashes.<p>Given we do not use any of best features of Bazel (remote&#x2F;distributed compilation, multiple languages, and caching (because we basically spawn a new docker container for each build)), I think CMake would have made more sense.
评论 #34057635 未加载
lalaland1125超过 2 年前
The main change here is that Bazel now has a package repository that people can pull&#x2F;push external dependencies to: <a href="https:&#x2F;&#x2F;registry.bazel.build&#x2F;" rel="nofollow">https:&#x2F;&#x2F;registry.bazel.build&#x2F;</a><p>This is a huge change as external dependencies used to be one of the big pain points with the Bazel pipeline.
评论 #34059485 未加载
tinglymintyfrsh超过 2 年前
0. Does it do creating static libraries yet?<p>1. Does it do linking to a mix of static and dynamic libraries yet?<p>2. Anyone try buck2, sort of bzl-like?
评论 #34056682 未加载
no_wizard超过 2 年前
NX is a very bazel like for frontend focused repositories.<p>I think what I struggle with the most is the opinions of the rules &#x2F; plugins. Either I use it as a core task runner (easy, but lots of config the team has to maintain setting up script entries in packages etc) or I have to write custom plugins for anyting not on the &quot;happy path&quot;.<p>I think thats my general frustration with these tools, they aren&#x27;t terribly well built for SDK type consumption, they don&#x27;t expose a core set of APIs directly, instead relying on a plugin system that can sometimes be very opaque
simplotek超过 2 年前
From the announcement:<p>&gt; One of Bazel&#x27;s most powerful features is its ability to use remote caching and remote execution.<p>What&#x27;s the value proposition of Bazel when build systems like cmake support this out of the box with third-party tools like distcc and ccache?
评论 #34059947 未加载
评论 #34057761 未加载
评论 #34058423 未加载