mirror of
https://github.com/hanzoai/code.git
synced 2026-09-30 20:53:35 +00:00
rebase from 17baf84
This commit is contained in:
@@ -2949,7 +2949,7 @@ getrandom 0.1.16 - MIT OR Apache-2.0
|
||||
getrandom 0.2.15 - MIT OR Apache-2.0
|
||||
https://github.com/rust-random/getrandom
|
||||
|
||||
Copyright (c) 2018-2024 The rust-random Project Developers
|
||||
Copyright (c) 2018-2025 The rust-random Project Developers
|
||||
Copyright (c) 2014 The Rust Project Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
@@ -5513,7 +5513,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
---------------------------------------------------------
|
||||
|
||||
opentelemetry 0.19.0 - Apache-2.0
|
||||
https://github.com/open-telemetry/opentelemetry-rust
|
||||
https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
@@ -5929,7 +5929,7 @@ Apache License
|
||||
---------------------------------------------------------
|
||||
|
||||
opentelemetry_sdk 0.19.0 - Apache-2.0
|
||||
https://github.com/open-telemetry/opentelemetry-rust
|
||||
https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-sdk
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
@@ -8584,7 +8584,6 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg
|
||||
[deps-link]: https://deps.rs/repo/github/RustCrypto/hashes
|
||||
[msrv-1.85]: https://img.shields.io/badge/rustc-1.85.0+-blue.svg
|
||||
|
||||
[//]: # (crates)
|
||||
|
||||
@@ -8596,6 +8595,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[`groestl`]: ./groestl
|
||||
[`jh`]: ./jh
|
||||
[`k12`]: ./k12
|
||||
[`kupyna`]: ./kupyna
|
||||
[`md2`]: ./md2
|
||||
[`md4`]: ./md4
|
||||
[`md5`]: ./md5
|
||||
@@ -8638,6 +8638,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[Grøstl]: https://en.wikipedia.org/wiki/Grøstl
|
||||
[JH]: https://www3.ntu.edu.sg/home/wuhj/research/jh
|
||||
[KangarooTwelve]: https://keccak.team/kangarootwelve.html
|
||||
[Kupyna]: https://eprint.iacr.org/2015/885.pdf
|
||||
[MD2]: https://en.wikipedia.org/wiki/MD2_(cryptography)
|
||||
[MD4]: https://en.wikipedia.org/wiki/MD4
|
||||
[MD5]: https://en.wikipedia.org/wiki/MD5
|
||||
@@ -8677,7 +8678,6 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg
|
||||
[deps-link]: https://deps.rs/repo/github/RustCrypto/hashes
|
||||
[msrv-1.85]: https://img.shields.io/badge/rustc-1.85.0+-blue.svg
|
||||
|
||||
[//]: # (crates)
|
||||
|
||||
@@ -8689,6 +8689,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[`groestl`]: ./groestl
|
||||
[`jh`]: ./jh
|
||||
[`k12`]: ./k12
|
||||
[`kupyna`]: ./kupyna
|
||||
[`md2`]: ./md2
|
||||
[`md4`]: ./md4
|
||||
[`md5`]: ./md5
|
||||
@@ -8731,6 +8732,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
|
||||
[Grøstl]: https://en.wikipedia.org/wiki/Grøstl
|
||||
[JH]: https://www3.ntu.edu.sg/home/wuhj/research/jh
|
||||
[KangarooTwelve]: https://keccak.team/kangarootwelve.html
|
||||
[Kupyna]: https://eprint.iacr.org/2015/885.pdf
|
||||
[MD2]: https://en.wikipedia.org/wiki/MD2_(cryptography)
|
||||
[MD4]: https://en.wikipedia.org/wiki/MD4
|
||||
[MD5]: https://en.wikipedia.org/wiki/MD5
|
||||
@@ -9395,7 +9397,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
tar 0.4.40 - MIT/Apache-2.0
|
||||
https://github.com/alexcrichton/tar-rs
|
||||
|
||||
Copyright (c) 2014 Alex Crichton
|
||||
Copyright (c) The tar-rs Project Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
@@ -9519,7 +9521,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
time 0.3.36 - MIT OR Apache-2.0
|
||||
https://github.com/time-rs/time
|
||||
|
||||
Copyright (c) 2024 Jacob Pratt et al.
|
||||
Copyright (c) Jacob Pratt et al.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -9545,7 +9547,7 @@ SOFTWARE.
|
||||
time-core 0.1.2 - MIT OR Apache-2.0
|
||||
https://github.com/time-rs/time
|
||||
|
||||
Copyright (c) 2024 Jacob Pratt et al.
|
||||
Copyright (c) Jacob Pratt et al.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+2
-2
@@ -665,12 +665,12 @@ impl Auth {
|
||||
.into();
|
||||
}
|
||||
|
||||
return StatusError {
|
||||
StatusError {
|
||||
body: String::from_utf8_lossy(&body).to_string(),
|
||||
status_code,
|
||||
url: url.to_string(),
|
||||
}
|
||||
.into();
|
||||
.into()
|
||||
}
|
||||
/// Implements the device code flow, returning the credentials upon success.
|
||||
async fn do_device_code_flow(&self) -> Result<StoredCredential, AnyError> {
|
||||
|
||||
+1
-1
@@ -282,7 +282,7 @@ pub struct DownloadLogger<'a> {
|
||||
logger: &'a Logger,
|
||||
}
|
||||
|
||||
impl<'a> crate::util::io::ReportCopyProgress for DownloadLogger<'a> {
|
||||
impl crate::util::io::ReportCopyProgress for DownloadLogger<'_> {
|
||||
fn report_progress(&mut self, bytes_so_far: u64, total_bytes: u64) {
|
||||
if total_bytes > 0 {
|
||||
self.logger.emit(
|
||||
|
||||
@@ -142,7 +142,7 @@ pub fn make_singleton_server(
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn start_singleton_server<'a>(
|
||||
pub async fn start_singleton_server(
|
||||
args: SingletonServerArgs<'_>,
|
||||
) -> Result<ServerTermination, AnyError> {
|
||||
let shutdown_rx = ShutdownRequest::create_rx([
|
||||
|
||||
@@ -235,6 +235,7 @@ mod tests {
|
||||
.write(true)
|
||||
.read(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(&file_path)
|
||||
.unwrap();
|
||||
|
||||
@@ -271,6 +272,7 @@ mod tests {
|
||||
.write(true)
|
||||
.read(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(&file_path)
|
||||
.unwrap();
|
||||
|
||||
@@ -305,6 +307,7 @@ mod tests {
|
||||
.write(true)
|
||||
.read(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(&file_path)
|
||||
.unwrap();
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
+12
-24
@@ -20,19 +20,16 @@ lazy_static! {
|
||||
static ref LIBSTD_CXX_VERSION_RE: BinRegex =
|
||||
BinRegex::new(r"GLIBCXX_([0-9]+)\.([0-9]+)(?:\.([0-9]+))?").unwrap();
|
||||
static ref MIN_LDD_VERSION: SimpleSemver = SimpleSemver::new(2, 28, 0);
|
||||
static ref MIN_LEGACY_LDD_VERSION: SimpleSemver = SimpleSemver::new(2, 17, 0);
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
lazy_static! {
|
||||
static ref MIN_CXX_VERSION: SimpleSemver = SimpleSemver::new(3, 4, 26);
|
||||
static ref MIN_LEGACY_CXX_VERSION: SimpleSemver = SimpleSemver::new(3, 4, 22);
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "arm"))]
|
||||
lazy_static! {
|
||||
static ref MIN_CXX_VERSION: SimpleSemver = SimpleSemver::new(3, 4, 25);
|
||||
static ref MIN_LEGACY_CXX_VERSION: SimpleSemver = SimpleSemver::new(3, 4, 19);
|
||||
}
|
||||
|
||||
const NIXOS_TEST_PATH: &str = "/etc/NIXOS";
|
||||
@@ -74,12 +71,11 @@ impl PreReqChecker {
|
||||
} else {
|
||||
println!("!!! WARNING: Skipping server pre-requisite check !!!");
|
||||
println!("!!! Server stability is not guaranteed. Proceed at your own risk. !!!");
|
||||
// Use the legacy server for #210029
|
||||
(Ok(true), Ok(true))
|
||||
};
|
||||
|
||||
match (&gnu_a, &gnu_b, is_nixos) {
|
||||
(Ok(false), Ok(false), _) | (_, _, true) => {
|
||||
(Ok(true), Ok(true), _) | (_, _, true) => {
|
||||
return Ok(if cfg!(target_arch = "x86_64") {
|
||||
Platform::LinuxX64
|
||||
} else if cfg!(target_arch = "arm") {
|
||||
@@ -88,15 +84,6 @@ impl PreReqChecker {
|
||||
Platform::LinuxARM64
|
||||
});
|
||||
}
|
||||
(Ok(_), Ok(_), _) => {
|
||||
return Ok(if cfg!(target_arch = "x86_64") {
|
||||
Platform::LinuxX64Legacy
|
||||
} else if cfg!(target_arch = "arm") {
|
||||
Platform::LinuxARM32Legacy
|
||||
} else {
|
||||
Platform::LinuxARM64Legacy
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
|
||||
@@ -149,7 +136,7 @@ async fn check_musl_interpreter() -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Checks the glibc version, returns "true" if the legacy server is required.
|
||||
/// Checks the glibc version, returns "true" if the default server is required.
|
||||
#[cfg(target_os = "linux")]
|
||||
async fn check_glibc_version() -> Result<bool, String> {
|
||||
#[cfg(target_env = "gnu")]
|
||||
@@ -169,8 +156,6 @@ async fn check_glibc_version() -> Result<bool, String> {
|
||||
|
||||
if let Some(v) = version {
|
||||
return if v >= *MIN_LDD_VERSION {
|
||||
Ok(false)
|
||||
} else if v >= *MIN_LEGACY_LDD_VERSION {
|
||||
Ok(true)
|
||||
} else {
|
||||
Err(format!(
|
||||
@@ -192,10 +177,17 @@ async fn check_is_nixos() -> bool {
|
||||
|
||||
/// Do not remove this check.
|
||||
/// Provides a way to skip the server glibc requirements check from
|
||||
/// outside the install flow. A system process can create this
|
||||
/// file before the server is downloaded and installed.
|
||||
/// outside the install flow.
|
||||
///
|
||||
/// 1) A system process can create this
|
||||
/// file before the server is downloaded and installed.
|
||||
///
|
||||
/// 2) An environment variable declared in host
|
||||
/// that contains path to a glibc sysroot satisfying the
|
||||
/// minimum requirements.
|
||||
#[cfg(not(windows))]
|
||||
pub async fn skip_requirements_check() -> bool {
|
||||
std::env::var("VSCODE_SERVER_CUSTOM_GLIBC_LINKER").is_ok() ||
|
||||
fs::metadata("/tmp/vscode-skip-server-requirements-check")
|
||||
.await
|
||||
.is_ok()
|
||||
@@ -206,7 +198,7 @@ pub async fn skip_requirements_check() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Checks the glibc++ version, returns "true" if the legacy server is required.
|
||||
/// Checks the glibc++ version, returns "true" if the default server is required.
|
||||
#[cfg(target_os = "linux")]
|
||||
async fn check_glibcxx_version() -> Result<bool, String> {
|
||||
let mut libstdc_path: Option<String> = None;
|
||||
@@ -250,10 +242,6 @@ fn check_for_sufficient_glibcxx_versions(contents: Vec<u8>) -> Result<bool, Stri
|
||||
|
||||
if let Some(max_version) = &max_version {
|
||||
if max_version >= &*MIN_CXX_VERSION {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
if max_version >= &*MIN_LEGACY_CXX_VERSION {
|
||||
return Ok(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user