This commit is contained in:
Laurențiu Nicola 2021-10-23 15:07:11 +03:00
parent fe7c516084
commit 8457ae34bd
37 changed files with 38 additions and 37 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -5,6 +5,7 @@ description = "TBD"
license = "MIT OR Apache-2.0"
authors = ["rust-analyzer developers"]
edition = "2021"
rust-version = "1.56"
[features]
tracking = []

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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]

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -4,6 +4,7 @@ name = "syntax-fuzz"
version = "0.0.1"
publish = false
edition = "2021"
rust-version = "1.56"
[package.metadata]
cargo-fuzz = true

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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,
}
}