scrape upgrade bits from standalone/binary and lsp/language_server
OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=170
This commit is contained in:
parent
26b4d352fb
commit
61549e8139
@ -219,3 +219,62 @@ index 4593092..3247915 100644
|
||||
pub mod test;
|
||||
-pub mod upgrade;
|
||||
pub mod vendor;
|
||||
diff --git a/cli/standalone/binary.rs.1 b/cli/standalone/binary.rs
|
||||
index 628922b..f8bb1e2 100644
|
||||
--- a/cli/standalone/binary.rs.1
|
||||
+++ b/cli/standalone/binary.rs
|
||||
@@ -429,11 +429,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
|
||||
|
||||
let archive_data = std::fs::read(binary_path)?;
|
||||
let temp_dir = tempfile::TempDir::new()?;
|
||||
- let base_binary_path = crate::tools::upgrade::unpack_into_dir(
|
||||
- archive_data,
|
||||
- target.contains("windows"),
|
||||
- &temp_dir,
|
||||
- )?;
|
||||
+ let base_binary_path = "/tmp";
|
||||
let base_binary = std::fs::read(base_binary_path)?;
|
||||
drop(temp_dir); // delete the temp dir
|
||||
Ok(base_binary)
|
||||
diff --git a/cli/lsp/language_server.rs.1 b/cli/lsp/language_server.rs
|
||||
index 573fb1e..158c136 100644
|
||||
--- a/cli/lsp/language_server.rs.1
|
||||
+++ b/cli/lsp/language_server.rs
|
||||
@@ -119,8 +119,6 @@ use crate::npm::CliNpmResolverManagedPackageJsonInstallerOption;
|
||||
use crate::npm::CliNpmResolverManagedSnapshotOption;
|
||||
use crate::tools::fmt::format_file;
|
||||
use crate::tools::fmt::format_parsed_source;
|
||||
-use crate::tools::upgrade::check_for_upgrades_for_lsp;
|
||||
-use crate::tools::upgrade::upgrade_check_enabled;
|
||||
use crate::util::fs::remove_dir_all_if_exists;
|
||||
use crate::util::path::is_importable_ext;
|
||||
use crate::util::path::specifier_to_file_path;
|
||||
@@ -3335,28 +3333,6 @@ impl tower_lsp::LanguageServer for LanguageServer {
|
||||
ls.task_queue.start(self.clone());
|
||||
};
|
||||
|
||||
- if upgrade_check_enabled() {
|
||||
- // spawn to avoid lsp send/sync requirement, but also just
|
||||
- // to ensure this initialized method returns quickly
|
||||
- spawn(async move {
|
||||
- match check_for_upgrades_for_lsp(http_client).await {
|
||||
- Ok(version_info) => {
|
||||
- client.send_did_upgrade_check_notification(
|
||||
- lsp_custom::DidUpgradeCheckNotificationParams {
|
||||
- upgrade_available: version_info.map(|info| {
|
||||
- lsp_custom::UpgradeAvailable {
|
||||
- latest_version: info.latest_version,
|
||||
- is_canary: info.is_canary,
|
||||
- }
|
||||
- }),
|
||||
- },
|
||||
- );
|
||||
- }
|
||||
- Err(err) => lsp_warn!("Failed to check for upgrades: {err}"),
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
-
|
||||
lsp_log!("Server ready.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user