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
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ pub fn try_acquire_code_generation_store_read_lock(
) -> Result<Option<CodeGenerationStoreLockV1>, CodeGenerationRetentionErrorV1> {
let store_root = canonical_store_root(store_root)?;
let lock = open_lock_file(&store_root.join(STORE_LOCK_FILE))?;
match lock
.try_lock_shared()
.map_err(std::io::Error::from)
{
match lock.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(Some(CodeGenerationStoreLockV1 {
file: lock,
store_root,
Expand Down
8 changes: 4 additions & 4 deletions crates/tracedecay-privacy/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ fn compile_regex(
///
/// Gitleaks rules are authored for Go's RE2. RE2 and Rust's `regex` share the
/// important restrictions, no backreferences, no lookaround, which is why the
/// catalogue transfers at all. They disagree in exactly two places, and both
/// catalogue transfers at all. They disagree in exactly three places, and all
/// are mechanical:
///
/// * **A literal `{`.** RE2 reads a brace that opens no valid repetition as a
Expand All @@ -654,10 +654,10 @@ fn compile_regex(
/// so it is *both* a different match and vastly larger to compile: three
/// upstream rules that repeat `\w` over a wide bound
/// (`pypi-...[\w-]{50,1000}`) blow past the compiler's 10 MB program limit.
/// Expanding `\w` to its RE2 meaning fixes the semantics and the size at once
/// , every rule in the catalogue then compiles under the default limit, with
/// Expanding `\w` to its RE2 meaning fixes the semantics and the size at once,
/// every rule in the catalogue then compiles under the default limit, with
/// no memory headroom bought and no rule dropped.
////// * **`\b` / `\B`.** RE2's word boundary is ASCII. Rust's is Unicode-aware,
/// * **`\b` / `\B`.** RE2's word boundary is ASCII. Rust's is Unicode-aware,
/// and a Unicode boundary is the one construct the lazy DFA gives up on the
/// moment the haystack holds a non-ASCII byte: every file with an em-dash or
/// an emoji in a comment was then scanned by the PikeVM, the slowest engine,
Expand Down
15 changes: 3 additions & 12 deletions crates/tracedecay-runtime-core/src/lifecycle_lease.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ pub fn acquire_shared_or_inherited(operation: &str) -> Result<LifecycleLease> {

fn acquire_shared_or_inherited_at(path: &Path, operation: &str) -> Result<LifecycleLease> {
let mut file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand Down Expand Up @@ -384,10 +381,7 @@ fn acquire_exclusive_at_with_timeout(
#[hotpath::measure(label = "runtime_core.lifecycle.acquire_shared")]
fn acquire_shared_at(path: &Path, operation: &str) -> Result<LifecycleLease> {
let mut file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand All @@ -404,10 +398,7 @@ fn acquire_shared_at(path: &Path, operation: &str) -> Result<LifecycleLease> {

fn try_acquire_shared_at(path: &Path, operation: &str) -> Result<SharedLeaseAttempt> {
let file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(SharedLeaseAttempt::Acquired(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![cfg(feature = "test-transport")]

mod graph_readiness;
mod hotspots;

use crate::common::fixture::git_run;
use crate::support::*;
Expand Down
Loading
Loading