proto becomes bxcore, the one shared crate (M5b task 00)
Done the way the owner asked and the spike mapped: the crate and the manifests renamed, then what the build reported fixed. Layers: 138 "proto unresolved" errors across 169 files; cargo fmt reordering imports; six fixture paths built as strings in brokerd's and bxctl's tests, which the compiler cannot see, and comments naming crates/proto/; the crate-dependency check and its self-test. One more the spike did not reach: a `\nproto =` key inside a printf format in the self-test, which a word-boundary replacement skips because `n` and `p` are both word characters. make gate: gate: ok, 944 tests; no new entry in /tmp. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,11 +30,11 @@ pub struct Allow {
|
||||
|
||||
impl Allow {
|
||||
/// One or more host patterns separated by ','. Every piece must pass
|
||||
/// `proto::hosts::valid_host_pattern`; an empty piece (",", "a.com,", "") is an error.
|
||||
/// `bxcore::hosts::valid_host_pattern`; an empty piece (",", "a.com,", "") is an error.
|
||||
pub fn parse(list: &str) -> Result<Allow, String> {
|
||||
let mut patterns = Vec::new();
|
||||
for piece in list.split(',') {
|
||||
if !proto::hosts::valid_host_pattern(piece) {
|
||||
if !bxcore::hosts::valid_host_pattern(piece) {
|
||||
return Err(format!("'{piece}' is not a host or a *.host"));
|
||||
}
|
||||
patterns.push(piece.to_string());
|
||||
@@ -44,11 +44,11 @@ impl Allow {
|
||||
|
||||
/// `valid_host(host)` and some pattern `host_matches` it.
|
||||
pub fn permits(&self, host: &str) -> bool {
|
||||
proto::hosts::valid_host(host)
|
||||
bxcore::hosts::valid_host(host)
|
||||
&& self
|
||||
.patterns
|
||||
.iter()
|
||||
.any(|p| proto::hosts::host_matches(p, host))
|
||||
.any(|p| bxcore::hosts::host_matches(p, host))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use std::io::{self, Read};
|
||||
use std::path::Path;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
use proto::tools::HttpFetchArgs;
|
||||
use bxcore::tools::HttpFetchArgs;
|
||||
|
||||
use crate::Outcome;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::fs;
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
|
||||
use proto::tools::{ReadFileArgs, WriteFileArgs};
|
||||
use bxcore::tools::{ReadFileArgs, WriteFileArgs};
|
||||
|
||||
use crate::Outcome;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The programs that run inside tool containers.
|
||||
|
||||
use proto::tools::{HttpFetchArgs, ReadFileArgs, ShellArgs, WriteFileArgs};
|
||||
use bxcore::tools::{HttpFetchArgs, ReadFileArgs, ShellArgs, WriteFileArgs};
|
||||
|
||||
pub mod addr;
|
||||
pub mod egress;
|
||||
|
||||
@@ -7,7 +7,7 @@ use std::os::unix::process::ExitStatusExt;
|
||||
use std::path::Path;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
use proto::tools::ShellArgs;
|
||||
use bxcore::tools::ShellArgs;
|
||||
|
||||
use crate::Outcome;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user