дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
Cargo.toml had no way to tell that a dependency had a newer release.
Dependencies in [dependencies], [dev-dependencies], [build-dependencies], target tables and [workspace.dependencies] now get a weak warning when the newest stable release is outside the version requirement, with a quick fix that rewrites the requirement at its original precision ("0.7" → "0.10") in both string and inline-table forms. Versions complete inside the version string, newest first, without yanked releases. Path, git and workspace-inherited dependencies are skipped, prereleases are only suggested to prerelease requirements, and failures stay silent.
Versions come from the crates.io sparse index through the backend's HTTP client, with an in-memory and on-disk cache and coalesced requests, behind a dependency version source shared by file-type parsers so other manifests can be added later. semver is now used directly; it was already linked into the app.
Fixes #479
18 рядки
553 B
Rust
18 рядки
553 B
Rust
//! Typed IPC adapters for manifest dependency versions.
|
|
use crate::state::AppState;
|
|
use ide_core::{DocId, IdeResult, RequestId};
|
|
use ide_workspace::dependencies::DependencyVersions;
|
|
use tauri::{State, Window};
|
|
|
|
#[tauri::command]
|
|
#[specta::specta]
|
|
pub async fn dependency_versions(
|
|
window: Window,
|
|
state: State<'_, AppState>,
|
|
doc: DocId,
|
|
offset: Option<u32>,
|
|
request: RequestId,
|
|
) -> IdeResult<Vec<DependencyVersions>> {
|
|
ide_host::ops::dependencies::dependency_versions(&state.host, window.label(), doc, offset, request).await
|
|
}
|