Skip to content

Add monorepo Bazel integration - #575

Merged
snowp merged 4 commits into
mainfrom
monorepo
Aug 7, 2026
Merged

Add monorepo Bazel integration#575
snowp merged 4 commits into
mainfrom
monorepo

Conversation

@snowp

@snowp snowp commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

snowp and others added 2 commits August 6, 2026 17:34
Co-Authored-By: GPT-5.6 <codex@openai.com>
["src/**/*.rs"],
exclude = ["src/bin/**/*.rs"],
),
# logger-cli is a workspace consumer of the optional observation API. Bazel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this going to cause issues? How do we do features in this world?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way to do this is to have two distinct build targets, one with and another one without. Downstreams then depend on the one they want

For most crates features are additive and just enables more code so this is fine, but for stuff that changes behavior we'll have to be a bit careful. Transitive features for first party crates isn't really supported in Bazel but it's not that common

I'll clean this up in a follow up to make it so that only logger-cli depends on the extra feature

Comment thread logger-cli/src/bin/mcp.rs Outdated

struct Tool {
#[expect(
clippy::struct_field_names,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just allow this globally

Comment thread fuzz/BUILD.bazel Outdated
@@ -0,0 +1,82 @@
load("@crates//:defs.bzl", "all_crate_deps")
load("@rules_rs//rs:rust_library.bzl", "rust_library")
load("@rules_rs//rs:rust_binary.bzl", "rust_binary")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you going to handle rewriting the test and binary targets for clippy etc. Should these just point to root paths and not work in isolation or will you rewrite them somehow?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be using the top level ones yeah, let me update. I'd add a lint for that at some point

Comment thread Cargo.toml
rand = "0.10.2"
regex = "1.13.0"
reqwest = { version = "0.13.4", features = ["deflate", "json"] }
rusqlite = "0.32.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the other dep? This is what valve uses?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

@snowp
snowp enabled auto-merge (squash) August 7, 2026 03:28
@snowp
snowp merged commit a1d0f65 into main Aug 7, 2026
6 checks passed
@snowp
snowp deleted the monorepo branch August 7, 2026 03:33
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants