mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-24 12:03:31 +00:00
Set MSRV
This commit is contained in:
parent
fe7c516084
commit
8457ae34bd
37 changed files with 38 additions and 37 deletions
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -5,6 +5,7 @@ description = "Structural search and replace of Rust code"
|
|||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/rust-analyzer/rust-analyzer"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -5,6 +5,7 @@ description = "TBD"
|
|||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[features]
|
||||
tracking = []
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -3,6 +3,7 @@ name = "proc_macro_test"
|
|||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -3,6 +3,7 @@ name = "proc_macro_test_impl"
|
|||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -8,6 +8,7 @@ documentation = "https://rust-analyzer.github.io/manual.html"
|
|||
license = "MIT OR Apache-2.0"
|
||||
autobins = false
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -5,6 +5,7 @@ description = "Comment and whitespace preserving parser for the Rust language"
|
|||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/rust-analyzer/rust-analyzer"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ name = "syntax-fuzz"
|
|||
version = "0.0.1"
|
||||
publish = false
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||
description = "TBD"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
|
@ -7,3 +7,4 @@ repository = "https://github.com/rust-analyzer/rust-analyzer"
|
|||
documentation = "https://docs.rs/la-arena"
|
||||
categories = ["data-structures", "memory-management", "rust-patterns"]
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[package]
|
||||
edition = "2021"
|
||||
name = "xtask"
|
||||
version = "0.1.0"
|
||||
publish = false
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.26"
|
||||
|
|
|
@ -7,9 +7,6 @@ use xshell::{cmd, pushd};
|
|||
|
||||
use crate::flags;
|
||||
|
||||
// Latest stable, feel free to send a PR if this lags behind.
|
||||
const REQUIRED_RUST_VERSION: u32 = 56;
|
||||
|
||||
impl flags::Install {
|
||||
pub(crate) fn run(self) -> Result<()> {
|
||||
if cfg!(target_os = "macos") {
|
||||
|
@ -137,19 +134,6 @@ fn install_client(client_opt: ClientOpt) -> Result<()> {
|
|||
}
|
||||
|
||||
fn install_server(opts: ServerOpt) -> Result<()> {
|
||||
let mut old_rust = false;
|
||||
if let Ok(stdout) = cmd!("cargo --version").read() {
|
||||
if !check_version(&stdout, REQUIRED_RUST_VERSION) {
|
||||
old_rust = true;
|
||||
}
|
||||
}
|
||||
|
||||
if old_rust {
|
||||
eprintln!(
|
||||
"\nWARNING: at least rust 1.{}.0 is required to compile rust-analyzer\n",
|
||||
REQUIRED_RUST_VERSION,
|
||||
);
|
||||
}
|
||||
let features = match opts.malloc {
|
||||
Malloc::System => &[][..],
|
||||
Malloc::Mimalloc => &["--features", "mimalloc"],
|
||||
|
@ -157,25 +141,6 @@ fn install_server(opts: ServerOpt) -> Result<()> {
|
|||
};
|
||||
|
||||
let cmd = cmd!("cargo install --path crates/rust-analyzer --locked --force --features force-always-assert {features...}");
|
||||
let res = cmd.run();
|
||||
|
||||
if res.is_err() && old_rust {
|
||||
eprintln!(
|
||||
"\nWARNING: at least rust 1.{}.0 is required to compile rust-analyzer\n",
|
||||
REQUIRED_RUST_VERSION,
|
||||
);
|
||||
}
|
||||
|
||||
res?;
|
||||
cmd.run()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn check_version(version_output: &str, min_minor_version: u32) -> bool {
|
||||
// Parse second the number out of
|
||||
// cargo 1.39.0-beta (1c6ec66d5 2019-09-30)
|
||||
let minor: Option<u32> = version_output.split('.').nth(1).and_then(|it| it.parse().ok());
|
||||
match minor {
|
||||
None => true,
|
||||
Some(minor) => minor >= min_minor_version,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue