Skip to content

Commit

Permalink
[nfc] 08-22-24 build cleanup
Browse files Browse the repository at this point in the history
- Roll bazel 7.2.1 : 7.3.1
- Emphasize that full Xcode is required on macOS – this has been confusing to
  folks before
- Add comments for recently added const casts
- Drop check for *.bazel files for linting, this is already covered by BUILD.*
  • Loading branch information
fhanau committed Aug 23, 2024
1 parent 2535947 commit 0cce828
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.1
7.3.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To build `workerd`, you need:
* LLD 16+ (e.g. package `lld-16`). The build may still succeed if a recent version of GNU gold or the system linker is installed, but lld is highly recommended for link performance.
* `python3`, `python3-distutils`, and `tcl8.6`
* On macOS:
* Xcode 15 installation (available on macOS 13 and higher). Full Xcode is required, the Xcode command line tools alone are not sufficient for building.
* Xcode 15 installation (available on macOS 13 and higher). **Full Xcode is required**, the Xcode command line tools alone are **not sufficient** for building.
* Homebrew installed `tcl-tk` package (provides Tcl 8.6)
* On Windows:
* Install [App Installer](https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget)
Expand Down
1 change: 1 addition & 0 deletions src/workerd/api/crypto/keys.c++
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ kj::Array<kj::byte> AsymmetricKeyCryptoKeyImpl::exportKeyExt(kj::StringPtr forma
auto bio = OSSL_BIO_MEM();

struct EncDetail {
// const_cast is acceptable, pass will be reassigned before it is written to.
char* pass = const_cast<char*>(&EMPTY_PASSPHRASE[0]);
size_t pass_len = 0;
const EVP_CIPHER* cipher = nullptr;
Expand Down
1 change: 1 addition & 0 deletions src/workerd/io/actor-cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ class ActorCache final: public ActorCacheInterface {
ActorCache(rpc::ActorStorage::Stage::Client storage,
const SharedLru& lru,
OutputGate& gate,
// Hooks has no member variables, so const_cast is acceptable.
Hooks& hooks = const_cast<Hooks&>(Hooks::DEFAULT));
~ActorCache() noexcept(false);

Expand Down
1 change: 1 addition & 0 deletions src/workerd/io/actor-sqlite.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ActorSqlite final: public ActorCacheInterface, private kj::TaskSet::ErrorH
explicit ActorSqlite(kj::Own<SqliteDatabase> dbParam,
OutputGate& outputGate,
kj::Function<kj::Promise<void>()> commitCallback,
// Hooks has no member variables, so const_cast is acceptable.
Hooks& hooks = const_cast<Hooks&>(Hooks::DEFAULT));

bool isCommitScheduled() {
Expand Down
2 changes: 2 additions & 0 deletions src/workerd/io/io-gate.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class InputGate {
static const Hooks DEFAULT;
};

// Hooks has no member variables, so const_cast is acceptable.
InputGate(Hooks& hooks = const_cast<Hooks&>(Hooks::DEFAULT));
~InputGate() noexcept;

Expand Down Expand Up @@ -248,6 +249,7 @@ class OutputGate {
static const Hooks DEFAULT;
};

// Hooks has no member variables, so const_cast is acceptable.
OutputGate(Hooks& hooks = const_cast<Hooks&>(Hooks::DEFAULT));
~OutputGate() noexcept(false);

Expand Down
2 changes: 1 addition & 1 deletion tools/cross/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class FormatConfig:
FormatConfig(directory=".", globs=("*.py",), formatter=ruff),
FormatConfig(
directory=".",
globs=("*.bzl", "*.bazel", "WORKSPACE", "BUILD", "BUILD.*"),
globs=("*.bzl", "WORKSPACE", "BUILD", "BUILD.*"),
formatter=buildifier,
),
]
Expand Down

0 comments on commit 0cce828

Please sign in to comment.