<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Bazel on Alwaldend</title>
		<link>https://www-staging.alwaldend.com/tags/bazel/</link>
		<description>Recent content in Bazel on Alwaldend</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<atom:link href="https://www-staging.alwaldend.com/tags/bazel/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Bazel</title>
				<link>https://www-staging.alwaldend.com/docs/misc/bazel/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www-staging.alwaldend.com/docs/misc/bazel/</guid>
				<description>&lt;h2 id=&#34;advantages&#34;&gt;Advantages&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#advantages&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;Hermetic builds&lt;/li&gt;&#xA;&lt;li&gt;Dependency graph&lt;/li&gt;&#xA;&lt;li&gt;Local build and test cache&lt;/li&gt;&#xA;&lt;li&gt;Remote cache&lt;/li&gt;&#xA;&lt;li&gt;Remote execution&lt;/li&gt;&#xA;&lt;li&gt;Unified API for builds, tasks, and tests&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;disadvantages&#34;&gt;Disadvantages&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#disadvantages&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;Additional layer of abstraction and complexity&lt;/li&gt;&#xA;&lt;li&gt;Weird edge cases and occasional bugs&lt;/li&gt;&#xA;&lt;li&gt;Lack of support, documentation, and information on the internet&lt;/li&gt;&#xA;&lt;li&gt;The majority of advantages are irrelevant for the majority of codebases&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;bazelrc-has-variables&#34;&gt;.bazelrc has variables&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#bazelrc-has-variables&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;%workspace%&lt;/code&gt;: Workspace directory&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://bazel.build/run/bazelrc&#34;&gt;https://bazel.build/run/bazelrc&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;local-registry-module-is-cached&#34;&gt;Local registry module is cached&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#local-registry-module-is-cached&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;If you changed a local registry module, but bazel still uses the old version,&#xA;restart bazel: &lt;code&gt;bazel shutdown&lt;/code&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bazel agent</title>
				<link>https://www-staging.alwaldend.com/docs/projects/bazel_agent/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www-staging.alwaldend.com/docs/projects/bazel_agent/</guid>
				<description>&lt;p&gt;&lt;code&gt;bazel_agent&lt;/code&gt; is the repository Bazel entry point for agents. It keeps the&#xA;Bazel invocation behind a validated subcommand while consistently applying the&#xA;agent configuration:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bazel_agent bazel test //path/to/package:all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    -&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bazel test --config=agent //path/to/package:all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;bazel&lt;/code&gt; is the only Bazel entry point, and it is a validated subcommand. The&#xA;runner accepts a known Bazel command after the &lt;code&gt;bazel&lt;/code&gt; keyword, rejects&#xA;arbitrary leading arguments, and places &lt;code&gt;--config=agent&lt;/code&gt; after the command.&#xA;Targets, command options, and arguments after the &lt;code&gt;--&lt;/code&gt; separator of a&#xA;&lt;code&gt;bazel run&lt;/code&gt; invocation pass through unchanged. Later options therefore retain&#xA;Bazel&amp;rsquo;s normal precedence and can override settings supplied by the agent&#xA;configuration. The runner resolves &lt;code&gt;bazel&lt;/code&gt; from &lt;code&gt;PATH&lt;/code&gt; and replaces itself&#xA;with that process, so signals and the final exit status are not mediated by&#xA;another wrapper process. Uses of the persistent Bazel server follow the host&#xA;Codex network policy; the &lt;code&gt;host-bot&lt;/code&gt; profile allows loopback so the&#xA;client-server connection is not blocked.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bazel agent</title>
				<link>https://www-staging.alwaldend.com/projects/bazel_agent/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www-staging.alwaldend.com/projects/bazel_agent/</guid>
				<description>&lt;p&gt;&lt;code&gt;bazel_agent&lt;/code&gt; is the Bazel entry point for agents working in this&#xA;repository. It keeps Bazel behind a validated subcommand while consistently&#xA;applying the agent configuration.&lt;/p&gt;&#xA;&lt;h2 id=&#34;features&#34;&gt;Features&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#features&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;Validated &lt;code&gt;bazel&lt;/code&gt; subcommand instead of arbitrary arguments&lt;/li&gt;&#xA;&lt;li&gt;Applies the agent configuration in the required position&lt;/li&gt;&#xA;&lt;li&gt;Preserves signals and exit status by replacing itself with the Bazel process&lt;/li&gt;&#xA;&lt;li&gt;Read-only &lt;code&gt;doctor&lt;/code&gt; diagnostics for runner and workspace state&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
			<item>
				<title>com_github_bazelbuild_bazelisk</title>
				<link>https://www-staging.alwaldend.com/docs/third_party/com_github_bazelbuild_bazelisk/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www-staging.alwaldend.com/docs/third_party/com_github_bazelbuild_bazelisk/</guid>
				<description>&lt;h2 id=&#34;links&#34;&gt;Links&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#links&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;Site: &lt;a href=&#34;https://github.com/bazelbuild/bazelisk&#34;&gt;https://github.com/bazelbuild/bazelisk&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Releases: &lt;a href=&#34;https://github.com/bazelbuild/bazelisk/releases&#34;&gt;https://github.com/bazelbuild/bazelisk/releases&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
			<item>
				<title>Maven Install Gradle Converter</title>
				<link>https://www-staging.alwaldend.com/docs/tools/maven_install_gradle_converter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www-staging.alwaldend.com/docs/tools/maven_install_gradle_converter/</guid>
				<description>&lt;p&gt;Converts &lt;code&gt;rules_jvm_external&lt;/code&gt; &lt;code&gt;maven_install.json&lt;/code&gt; lock files into Gradle&#xA;version catalogs and dependency verification metadata so Bazel-built Android&#xA;apps can maintain the parallel Gradle build required for F-Droid.&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#usage&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Use the &lt;code&gt;al_gradle_lock&lt;/code&gt; Starlark macro from&#xA;&lt;code&gt;main/bzl/gradle_lock.bzl&lt;/code&gt; in your app&amp;rsquo;s &lt;code&gt;gradle/BUILD.bazel&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-starlark&#34; data-lang=&#34;starlark&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;//tools/maven_install_gradle_converter:defs.bzl&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;al_gradle_lock&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;al_gradle_lock(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    name &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;update&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    lock_file &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;//projects/&amp;lt;app&amp;gt;:maven_lock.json&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    tool &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;//tools/maven_install_gradle_converter/cmd/gradle_lock_gen&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run &lt;code&gt;bazel run :update_toml_write&lt;/code&gt; to regenerate the checked-in version&#xA;catalog. The corresponding &lt;code&gt;*_write_test&lt;/code&gt; target fails when it goes stale.&lt;/p&gt;&#xA;&lt;p&gt;Gradle owns &lt;code&gt;verification-metadata.xml&lt;/code&gt; because it must record the plugin&#xA;classpath in addition to the Bazel lock. Regenerate it with:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
