From 3957a2555dbd81271d3e29a2f0b8f07258037e7b Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Fri, 6 Nov 2020 17:33:02 +0000 Subject: [PATCH] Deprecate the WinPTY backend --- CHANGELOG.md | 1 + alacritty/Cargo.toml | 2 +- alacritty/src/config/mod.rs | 9 +++++++++ alacritty_terminal/Cargo.toml | 2 +- alacritty_terminal/src/config/mod.rs | 10 +++++----- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b0b17a9..a350cff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - The snapcraft.yaml file has been removed - Updated `setab`/`setaf` capabilities in `alacritty-direct` to use colons - WinPTY is now enabled only when targeting MSVC +- Deprecated the WinPTY backend feature, disabling it by default ### Added diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml index 905003e5..873c3da6 100644 --- a/alacritty/Cargo.toml +++ b/alacritty/Cargo.toml @@ -56,7 +56,7 @@ winapi = { version = "0.3.7", features = ["impl-default", "wincon"]} embed-resource = "1.3" [features] -default = ["wayland", "x11", "winpty"] +default = ["wayland", "x11"] x11 = ["copypasta/x11", "glutin/x11", "x11-dl"] wayland = ["copypasta/wayland", "glutin/wayland", "wayland-client"] winpty = ["alacritty_terminal/winpty"] diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index d268d921..9aa2a74c 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -312,6 +312,15 @@ fn print_deprecation_warnings(config: &Config) { "Config dynamic_title is deprecated; please use window.dynamic_title instead", ) } + + #[cfg(all(windows, not(feature = "winpty")))] + if config.winpty_backend { + warn!( + target: LOG_TARGET_CONFIG, + "Config winpty_backend is deprecated and requires a compilation flag; it should be \ + removed from the config", + ) + } } #[cfg(test)] diff --git a/alacritty_terminal/Cargo.toml b/alacritty_terminal/Cargo.toml index 83c5b416..89da83bd 100644 --- a/alacritty_terminal/Cargo.toml +++ b/alacritty_terminal/Cargo.toml @@ -41,7 +41,7 @@ mio-anonymous-pipes = "0.1" winpty = { version = "0.2.0", optional = true } [features] -default = ["winpty"] +default = [] bench = [] [dev-dependencies] diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index add38c59..98849d90 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -55,11 +55,6 @@ pub struct Config { #[serde(default, deserialize_with = "failure_default")] pub cursor: Cursor, - /// Use WinPTY backend even if ConPTY is available. - #[cfg(windows)] - #[serde(default, deserialize_with = "failure_default")] - pub winpty_backend: bool, - /// Shell startup directory. #[serde(default, deserialize_with = "option_explicit_none")] pub working_directory: Option, @@ -72,6 +67,11 @@ pub struct Config { #[serde(skip)] pub hold: bool, + // TODO: DEPRECATED + #[cfg(windows)] + #[serde(default, deserialize_with = "failure_default")] + pub winpty_backend: bool, + // TODO: DEPRECATED #[serde(default, deserialize_with = "failure_default")] pub visual_bell: Option,