Extract SemanticVersion into its own crate (#9956)

This PR extracts the `SemanticVersion` out of `util` and into its own
`SemanticVersion` crate.

This allows for making use of `SemanticVersion` without needing to pull
in some of the heavier dependencies included in the `util` crate.

As part of this the public API for `SemanticVersion` has been tidied up
a bit.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-29 12:11:57 -04:00 committed by GitHub
parent 77f1cc95b8
commit 16e6f5643c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 147 additions and 110 deletions

View file

@ -4,8 +4,8 @@ mod v0_0_4;
use super::{wasm_engine, WasmState};
use anyhow::{Context, Result};
use language::LspAdapterDelegate;
use semantic_version::SemanticVersion;
use std::sync::Arc;
use util::SemanticVersion;
use wasmtime::{
component::{Component, Instance, Linker, Resource},
Store,

View file

@ -3,15 +3,11 @@ use crate::wasm_host::WasmState;
use anyhow::Result;
use async_trait::async_trait;
use language::{LanguageServerBinaryStatus, LspAdapterDelegate};
use semantic_version::SemanticVersion;
use std::sync::{Arc, OnceLock};
use util::SemanticVersion;
use wasmtime::component::{Linker, Resource};
pub const VERSION: SemanticVersion = SemanticVersion {
major: 0,
minor: 0,
patch: 1,
};
pub const VERSION: SemanticVersion = SemanticVersion::new(0, 0, 1);
wasmtime::component::bindgen!({
async: true,

View file

@ -5,19 +5,16 @@ use async_tar::Archive;
use async_trait::async_trait;
use futures::io::BufReader;
use language::{LanguageServerBinaryStatus, LspAdapterDelegate};
use semantic_version::SemanticVersion;
use std::{
env,
path::PathBuf,
sync::{Arc, OnceLock},
};
use util::{maybe, SemanticVersion};
use util::maybe;
use wasmtime::component::{Linker, Resource};
pub const VERSION: SemanticVersion = SemanticVersion {
major: 0,
minor: 0,
patch: 4,
};
pub const VERSION: SemanticVersion = SemanticVersion::new(0, 0, 4);
wasmtime::component::bindgen!({
async: true,