Skip to content

Commit 8a24b93

Browse files
committed
vendor: inhouse url and validate upstream patch sync
1 parent b084a15 commit 8a24b93

8 files changed

Lines changed: 67 additions & 28 deletions

File tree

‎Cargo.lock‎

Lines changed: 10 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,4 @@ axum = { path = "lib/vendor/axum" }
9696
reqwest = { path = "lib/vendor/reqwest" }
9797
tower-http = { path = "lib/vendor/tower-http" }
9898
ratatui = { path = "lib/vendor/ratatui" }
99+
url = { path = "lib/vendor/url" }

‎lib/vendor-manifest/axum.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
crate = "axum"
2-
version = "0.8.7"
2+
version = "0.8.8"
33
source = "crates.io"
4-
synced_at_utc = "2026-02-21T11:05:35Z"
4+
synced_at_utc = "2026-02-22T18:24:59Z"
55
history_repo = "lib/vendor-history/axum.git"
6-
history_head = "56e0f2f7278801626dbbc5348efb4fb3d6b9595e"
6+
history_head = "fffdbe0b3d192ef263fda82d186a45c18aac3466"
77
materialized_path = "lib/vendor/axum"
8-
sync_cmd = "scripts/vendor/inhouse-crate.sh axum 0.8.7"
8+
sync_cmd = "scripts/vendor/inhouse-crate.sh axum 0.8.8"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
crate = "tower-http"
2-
version = "0.6.7"
2+
version = "0.6.8"
33
source = "crates.io"
4-
synced_at_utc = "2026-02-22T17:32:56Z"
4+
synced_at_utc = "2026-02-22T18:25:01Z"
55
history_repo = "lib/vendor-history/tower-http.git"
6-
history_head = "e07dc3a68986d50ea109ece58b30a6dc7b79981f"
6+
history_head = "954fa60bf1e962dc30919a13414833d7efac8e98"
77
materialized_path = "lib/vendor/tower-http"
8-
sync_cmd = "scripts/vendor/inhouse-crate.sh tower-http 0.6.7"
8+
sync_cmd = "scripts/vendor/inhouse-crate.sh tower-http 0.6.8"

‎lib/vendor-manifest/url.toml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
crate = "url"
2+
version = "2.5.8"
3+
source = "crates.io"
4+
synced_at_utc = "2026-02-22T18:25:03Z"
5+
history_repo = "lib/vendor-history/url.git"
6+
history_head = "42e98d5f89b624f6d1bb7d3e57f887c74461aed2"
7+
materialized_path = "lib/vendor/url"
8+
sync_cmd = "scripts/vendor/inhouse-crate.sh url 2.5.8"

‎scripts/vendor/important-crates.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ reqwest
22
axum
33
tower-http
44
ratatui
5+
url

‎scripts/vendor/inhouse-crate.sh‎

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,30 @@ vendor_root="lib/vendor"
3838
history_root="lib/vendor-history"
3939
manifest_root="lib/vendor-manifest"
4040

41+
find_cached_src_dir() {
42+
find "$HOME/.cargo/registry/src" -maxdepth 2 -type d -name "${crate}-${version}" 2>/dev/null \
43+
| head -n 1
44+
}
45+
46+
fetch_into_cache() {
47+
local fetch_tmp
48+
fetch_tmp="$(mktemp -d)"
49+
cat > "${fetch_tmp}/Cargo.toml" <<EOF
50+
[package]
51+
name = "vendor-fetch-${crate}"
52+
version = "0.0.0"
53+
edition = "2021"
54+
55+
[dependencies]
56+
${crate} = "= ${version}"
57+
EOF
58+
mkdir -p "${fetch_tmp}/src"
59+
printf '%s\n' 'fn main() {}' > "${fetch_tmp}/src/main.rs"
60+
61+
cargo fetch --manifest-path "${fetch_tmp}/Cargo.toml" >/dev/null 2>&1 || true
62+
rm -rf "$fetch_tmp"
63+
}
64+
4165
resolve_version_from_lock() {
4266
awk -v crate="$crate" '
4367
BEGIN { name = ""; version = ""; source = "" }
@@ -93,15 +117,16 @@ if [[ -z "$version" ]]; then
93117
exit 1
94118
fi
95119

96-
src_dir="$({
97-
find "$HOME/.cargo/registry/src" -maxdepth 2 -type d -name "${crate}-${version}" 2>/dev/null \
98-
| head -n 1
99-
} || true)"
120+
src_dir="$(find_cached_src_dir || true)"
100121

101122
if [[ -z "$src_dir" ]]; then
102-
echo "error: could not find ${crate}-${version} in cargo cache"
103-
echo "hint: run 'cargo fetch -p ${crate}@${version}' in a clean Cargo state and retry"
104-
exit 1
123+
fetch_into_cache
124+
src_dir="$(find_cached_src_dir || true)"
125+
if [[ -z "$src_dir" ]]; then
126+
echo "error: could not find ${crate}-${version} in cargo cache after auto-fetch"
127+
echo "hint: check network/cargo registry config, then retry"
128+
exit 1
129+
fi
105130
fi
106131

107132
mkdir -p "$history_root" "$vendor_root" "$manifest_root"

‎vendor.lock.toml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
repo = "git@github.com:nikivdev/flow-vendor.git"
33
branch = "main"
44
checkout = ".vendor/flow-vendor"
5-
commit = "d1cb0229368753fb8f1a5f32024abf63c8d70113"
5+
commit = "7224f5a10c015f0e18e3c13e1f4bbf9f4374629a"
66

77
[[crate]]
88
name = "axum"
@@ -27,3 +27,9 @@ name = "ratatui"
2727
repo_path = "crates/ratatui"
2828
manifest_path = "manifests/ratatui.toml"
2929
materialized_path = "lib/vendor/ratatui"
30+
31+
[[crate]]
32+
name = "url"
33+
repo_path = "crates/url"
34+
manifest_path = "manifests/url.toml"
35+
materialized_path = "lib/vendor/url"

0 commit comments

Comments
 (0)