Skip to content

Comments

fix: add missing url crate and fix axum 0.8 middleware signature#146

Open
ivanhoe wants to merge 1 commit intospacedriveapp:mainfrom
ivanhoe:fix/compilation-errors
Open

fix: add missing url crate and fix axum 0.8 middleware signature#146
ivanhoe wants to merge 1 commit intospacedriveapp:mainfrom
ivanhoe:fix/compilation-errors

Conversation

@ivanhoe
Copy link

@ivanhoe ivanhoe commented Feb 22, 2026

Problem

main does not compile cleanly after the merge of PR #117 (fix/security-hardening). Running cargo check on a fresh clone produces 5 errors.

Errors

  1. E0433browser.rs:34: url::Url::parse() used but the url crate is not in Cargo.toml
  2. E0282browser.rs:62,71,72: type inference failures (cascading from Add native Z.ai (GLM) provider #1)
  3. E0277server.rs:151: api_auth_middleware signature incompatible with axum 0.8's from_fn_with_state

Fix

  • Add url = "2" to Cargo.toml
  • Change api_auth_middleware to use State<Arc<ApiState>> extractor (required by axum 0.8)

browser.rs uses url::Url::parse() but the url crate was not listed in Cargo.toml, causing E0433 and cascading E0282 type inference errors.

Note: the axum 0.8 middleware signature fix (State extractor) was already resolved in main.
@ivanhoe ivanhoe force-pushed the fix/compilation-errors branch from 51b8929 to 91d297f Compare February 22, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant