Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: buildifier-lint
args: [--version, "v8.2.0", --warnings=all]
- repo: https://github.com/crate-ci/typos
rev: v1.35.5
rev: v1.38.1
hooks:
- id: typos
exclude: |
Expand All @@ -22,17 +22,17 @@ repos:
exclude_types:
- diff
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.9.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args: [--profile, black]
- repo: https://github.com/pre-commit/mirrors-clang-format
# See supported types: https://github.com/pre-commit/mirrors-clang-format/blob/v14.0.6/.pre-commit-hooks.yaml#L6
rev: v14.0.6
rev: v21.1.2
hooks:
- id: clang-format
exclude_types:
Expand Down
2 changes: 1 addition & 1 deletion crate_universe/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ rust_test(

### Direct Packages

In cases where Rust targets have heavy interractions with other Bazel targets ([Cc][cc], [Proto][proto], etc.),
In cases where Rust targets have heavy interactions with other Bazel targets ([Cc][cc], [Proto][proto], etc.),
maintaining `Cargo.toml` files may have deminishing returns as things like [rust-analyzer][ra] begin to be confused
about missing targets or environment variables defined only in Bazel. In workspaces like this, it may be desirable
to have a "Cargo free" setup. `crates_repository` supports this through the `packages` attribute.
Expand Down
4 changes: 2 additions & 2 deletions crate_universe/private/crates_vendor.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [[ -n "${{CARGO_BAZEL_DEBUG:-}}" ]]; then
fi

# Pass on CARGO_REGISTRIES_* and CARGO_REGISTRY*
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTR)
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTER)

# The path needs to be preserved to prevent bazel from starting with different
# startup options (requiring a restart of bazel).
Expand All @@ -65,7 +65,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION
@REM call :rlocation <runfile_path> <abs_path>
@REM The rlocation function maps the given <runfile_path> to its absolute
@REM path and stores the result in a variable named <abs_path>.
@REM This function fails if the <runfile_path> doesn't exist in mainifest
@REM This function fails if the <runfile_path> doesn't exist in manifest
@REM file.
:: Start of rlocation
goto :rlocation_end
Expand Down
2 changes: 1 addition & 1 deletion crate_universe/private/generate_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def determine_repin(
config,
splicing_manifest,
repin_instructions = None):
"""Use the `cargo-bazel` binary to determine whether or not dpeendencies need to be re-pinned
"""Use the `cargo-bazel` binary to determine whether or not dependencies need to be re-pinned

Args:
repository_ctx (repository_ctx): The rule's context object.
Expand Down
2 changes: 1 addition & 1 deletion examples/crate_universe/using_cxx/include/blobstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct BlobMetadata;
class BlobstoreClient {
public:
BlobstoreClient();
uint64_t put(MultiBuf &buf) const;
uint64_t put(MultiBuf& buf) const;
void tag(uint64_t blobid, rust::Str tag) const;
BlobMetadata metadata(uint64_t blobid) const;

Expand Down
6 changes: 3 additions & 3 deletions examples/crate_universe/using_cxx/src/blobstore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BlobstoreClient::impl {
BlobstoreClient::BlobstoreClient() : impl(new class BlobstoreClient::impl) {}

// Upload a new blob and return a blobid that serves as a handle to the blob.
uint64_t BlobstoreClient::put(MultiBuf &buf) const {
uint64_t BlobstoreClient::put(MultiBuf& buf) const {
std::string contents;

// Traverse the caller's chunk iterator.
Expand All @@ -39,7 +39,7 @@ uint64_t BlobstoreClient::put(MultiBuf &buf) const {
if (chunk.size() == 0) {
break;
}
contents.append(reinterpret_cast<const char *>(chunk.data()),
contents.append(reinterpret_cast<const char*>(chunk.data()),
chunk.size());
}

Expand All @@ -61,7 +61,7 @@ BlobMetadata BlobstoreClient::metadata(uint64_t blobid) const {
if (blob != impl->blobs.end()) {
metadata.size = blob->second.data.size();
std::for_each(blob->second.tags.cbegin(), blob->second.tags.cend(),
[&](auto &t) { metadata.tags.emplace_back(t); });
[&](auto& t) { metadata.tags.emplace_back(t); });
}
return metadata;
}
Expand Down
16 changes: 8 additions & 8 deletions ffi/cc/allocator_library/allocator_library.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ typedef __SIZE_TYPE__ uintptr_t;
// New feature as of https://github.com/rust-lang/rust/pull/88098.
__attribute__((weak)) uint8_t __rust_alloc_error_handler_should_panic = 0;

extern "C" uint8_t *__rdl_alloc(uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) uint8_t *__rust_alloc(uintptr_t size,
extern "C" uint8_t* __rdl_alloc(uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) uint8_t* __rust_alloc(uintptr_t size,
uintptr_t align) {
return __rdl_alloc(size, align);
}
extern "C" void __rdl_dealloc(uint8_t *ptr, uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) void __rust_dealloc(uint8_t *ptr,
extern "C" void __rdl_dealloc(uint8_t* ptr, uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) void __rust_dealloc(uint8_t* ptr,
uintptr_t size,
uintptr_t align) {
__rdl_dealloc(ptr, size, align);
}
extern "C" uint8_t *__rdl_realloc(uint8_t *ptr, uintptr_t old_size,
extern "C" uint8_t* __rdl_realloc(uint8_t* ptr, uintptr_t old_size,
uintptr_t align, uintptr_t new_size);
extern "C" __attribute__((weak)) uint8_t *__rust_realloc(uint8_t *ptr,
extern "C" __attribute__((weak)) uint8_t* __rust_realloc(uint8_t* ptr,
uintptr_t old_size,
uintptr_t align,
uintptr_t new_size) {
return __rdl_realloc(ptr, old_size, align, new_size);
}
extern "C" uint8_t *__rdl_alloc_zeroed(uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) uint8_t *__rust_alloc_zeroed(uintptr_t size,
extern "C" uint8_t* __rdl_alloc_zeroed(uintptr_t size, uintptr_t align);
extern "C" __attribute__((weak)) uint8_t* __rust_alloc_zeroed(uintptr_t size,
uintptr_t align) {
return __rdl_alloc_zeroed(size, align);
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/build_script_deps/build_script_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ build_script_deps_test = analysistest.make(
)

def build_script_test_suite(name):
"""Build script analyisis tests.
"""Build script analysis tests.

Args:
name: the test suite name
Expand Down
2 changes: 1 addition & 1 deletion test/unit/win_interface_library/bin.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern "C" void hello(void);

int main(int argc, char **argv) {
int main(int argc, char** argv) {
hello();
return 0;
}