Update dependencies

This patch applies all breaking and non-breaking dependency updates
and bumps MSRV to 1.70.0.
This commit is contained in:
Christian Duerr authored and GitHub committed 2023-10-08 07:29:57 +04:00
1 parent c2f8abecfb
commit 59c63d3738
15 files changed
+359 -334

No files matched your search

+2 -2
View File
@@ -24,8 +24,8 @@ tasks:
cargo test cargo test
- oldstable: | - oldstable: |
cd alacritty cd alacritty
rustup toolchain install --profile minimal 1.65.0 rustup toolchain install --profile minimal 1.70.0
rustup default 1.65.0 rustup default 1.70.0
cargo test cargo test
- clippy: | - clippy: |
cd alacritty cd alacritty
+2 -2
View File
@@ -34,8 +34,8 @@ tasks:
cargo test cargo test
- oldstable: | - oldstable: |
cd alacritty cd alacritty
rustup toolchain install --profile minimal 1.65.0 rustup toolchain install --profile minimal 1.70.0
rustup default 1.65.0 rustup default 1.70.0
cargo test cargo test
- clippy: | - clippy: |
cd alacritty cd alacritty
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
run: cargo test run: cargo test
- name: Oldstable - name: Oldstable
run: | run: |
rustup default 1.65.0 rustup default 1.70.0
cargo test cargo test
- name: Clippy - name: Clippy
run: | run: |
+1 -1
View File
@@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Packaging ### Packaging
- Minimum Rust version has been bumped to 1.65.0 - Minimum Rust version has been bumped to 1.70.0
- Manpages are now generated using `scdoc` (see `INSTALL.md`) - Manpages are now generated using `scdoc` (see `INSTALL.md`)
### Added ### Added
+1 -1
View File
@@ -42,7 +42,7 @@ and
[easy](https://github.com/alacritty/alacritty/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+-+easy%22) [easy](https://github.com/alacritty/alacritty/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+-+easy%22)
issues. issues.
Please note that the minimum supported version of Alacritty is Rust 1.65.0. All patches are expected Please note that the minimum supported version of Alacritty is Rust 1.70.0. All patches are expected
to work with the minimum supported version. to work with the minimum supported version.
Since `alacritty_terminal`'s version always tracks the next release, make sure that the version is Since `alacritty_terminal`'s version always tracks the next release, make sure that the version is
Generated
+311 -292
View File
File diff suppressed because it is too large. Load diff
+9 -9
View File
@@ -7,7 +7,7 @@ description = "A fast, cross-platform, OpenGL terminal emulator"
readme = "README.md" readme = "README.md"
homepage = "https://github.com/alacritty/alacritty" homepage = "https://github.com/alacritty/alacritty"
edition = "2021" edition = "2021"
rust-version = "1.65.0" rust-version = "1.70.0"
[dependencies.alacritty_terminal] [dependencies.alacritty_terminal]
path = "../alacritty_terminal" path = "../alacritty_terminal"
@@ -32,13 +32,13 @@ glutin = { version = "0.30.4", default-features = false, features = ["egl", "wgl
home = "0.5.5" home = "0.5.5"
libc = "0.2" libc = "0.2"
log = { version = "0.4", features = ["std", "serde"] } log = { version = "0.4", features = ["std", "serde"] }
notify = "5.1.0" notify = "6.1.1"
once_cell = "1.12" once_cell = "1.12"
parking_lot = "0.12.0" parking_lot = "0.12.0"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
serde_yaml = "0.8" serde_yaml = "0.9.25"
toml = "0.7.1" toml = "0.8.2"
unicode-width = "0.1" unicode-width = "0.1"
winit = { version = "0.29.1-beta", default-features = false, features = ["serde"] } winit = { version = "0.29.1-beta", default-features = false, features = ["serde"] }
@@ -55,12 +55,11 @@ xdg = "2.5.0"
png = { version = "0.17.5", default-features = false, optional = true } png = { version = "0.17.5", default-features = false, optional = true }
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.24.0" cocoa = "0.25.0"
objc = "0.2.2" objc = "0.2.2"
[target.'cfg(not(any(target_os="windows", target_os="macos")))'.dependencies] [target.'cfg(not(any(target_os="windows", target_os="macos")))'.dependencies]
x11-dl = { version = "2", optional = true } x11-dl = { version = "2", optional = true }
wayland-client = { version = "0.29.0", features = ["dlopen"], optional = true }
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
dirs = "5.0.1" dirs = "5.0.1"
@@ -72,7 +71,7 @@ windows-sys = { version = "0.48", features = [
]} ]}
[target.'cfg(windows)'.build-dependencies] [target.'cfg(windows)'.build-dependencies]
embed-resource = "1.7.2" embed-resource = "2.2.0"
[features] [features]
default = ["wayland", "x11"] default = ["wayland", "x11"]
@@ -82,12 +81,13 @@ x11 = [
"glutin/x11", "glutin/x11",
"glutin/glx", "glutin/glx",
"x11-dl", "x11-dl",
"png"] "png",
]
wayland = [ wayland = [
"copypasta/wayland", "copypasta/wayland",
"glutin/wayland", "glutin/wayland",
"winit/wayland", "winit/wayland",
"winit/wayland-dlopen", "winit/wayland-dlopen",
"winit/wayland-csd-adwaita-crossfont", "winit/wayland-csd-adwaita-crossfont",
"wayland-client"] ]
nightly = [] nightly = []
+1 -1
View File
@@ -23,7 +23,7 @@ fn main() {
.unwrap(); .unwrap();
#[cfg(windows)] #[cfg(windows)]
embed_resource::compile("./windows/alacritty.rc"); embed_resource::compile("./windows/alacritty.rc", embed_resource::NONE);
} }
fn commit_hash() -> Option<String> { fn commit_hash() -> Option<String> {
+1
View File
@@ -29,6 +29,7 @@ pub fn migrate(options: MigrateOptions) {
// If we're doing a wet run, perform a dry run first for safety. // If we're doing a wet run, perform a dry run first for safety.
if !options.dry_run { if !options.dry_run {
#[allow(clippy::redundant_clone)]
let mut options = options.clone(); let mut options = options.clone();
options.silent = true; options.silent = true;
options.dry_run = true; options.dry_run = true;
+2 -2
View File
@@ -6,9 +6,9 @@ license = "MIT OR Apache-2.0"
description = "Alacritty configuration abstractions" description = "Alacritty configuration abstractions"
homepage = "https://github.com/alacritty/alacritty" homepage = "https://github.com/alacritty/alacritty"
edition = "2021" edition = "2021"
rust-version = "1.65.0" rust-version = "1.70.0"
[dependencies] [dependencies]
log = { version = "0.4.17", features = ["serde"] } log = { version = "0.4.17", features = ["serde"] }
serde = "1.0.163" serde = "1.0.163"
toml = "0.7.1" toml = "0.8.2"
+2 -2
View File
@@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
description = "Failure resistant deserialization derive" description = "Failure resistant deserialization derive"
homepage = "https://github.com/alacritty/alacritty" homepage = "https://github.com/alacritty/alacritty"
edition = "2021" edition = "2021"
rust-version = "1.65.0" rust-version = "1.70.0"
[lib] [lib]
proc-macro = true proc-macro = true
@@ -23,4 +23,4 @@ version = "0.1.2-dev"
[dev-dependencies] [dev-dependencies]
log = "0.4.11" log = "0.4.11"
serde = { version = "1.0.117", features = ["derive"] } serde = { version = "1.0.117", features = ["derive"] }
toml = "0.7.1" toml = "0.8.2"
+6 -6
View File
@@ -7,7 +7,7 @@ description = "Library for writing terminal emulators"
readme = "../README.md" readme = "../README.md"
homepage = "https://github.com/alacritty/alacritty" homepage = "https://github.com/alacritty/alacritty"
edition = "2021" edition = "2021"
rust-version = "1.65.0" rust-version = "1.70.0"
[dependencies.alacritty_config_derive] [dependencies.alacritty_config_derive]
path = "../alacritty_config_derive" path = "../alacritty_config_derive"
@@ -18,7 +18,7 @@ path = "../alacritty_config"
version = "0.1.2-dev" version = "0.1.2-dev"
[dependencies] [dependencies]
base64 = "0.13.0" base64 = "0.21.3"
bitflags = { version = "2.2.1", features = ["serde"] } bitflags = { version = "2.2.1", features = ["serde"] }
home = "0.5.5" home = "0.5.5"
libc = "0.2" libc = "0.2"
@@ -27,18 +27,18 @@ parking_lot = "0.12.0"
polling = "3.0.0" polling = "3.0.0"
regex-automata = "0.3.6" regex-automata = "0.3.6"
serde = { version = "1", features = ["derive", "rc"] } serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.8" serde_yaml = "0.9.25"
toml = "0.7.1" toml = "0.8.2"
unicode-width = "0.1" unicode-width = "0.1"
vte = { version = "0.12.0", default-features = false, features = ["ansi", "serde"] } vte = { version = "0.12.0", default-features = false, features = ["ansi", "serde"] }
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
nix = { version = "0.26.2", default-features = false, features = ["term"] } nix = { version = "0.27.1", default-features = false, features = ["term"] }
signal-hook = "0.3.10" signal-hook = "0.3.10"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
piper = "0.2.1" piper = "0.2.1"
miow = "0.3.0" miow = "0.6.0"
windows-sys = { version = "0.48.0", features = [ windows-sys = { version = "0.48.0", features = [
"Win32_System_Console", "Win32_System_Console",
"Win32_Foundation", "Win32_Foundation",
+4 -2
View File
@@ -4,6 +4,8 @@ use std::ops::{Index, IndexMut, Range};
use std::sync::Arc; use std::sync::Arc;
use std::{cmp, mem, ptr, slice, str}; use std::{cmp, mem, ptr, slice, str};
use base64::engine::general_purpose::STANDARD as Base64;
use base64::Engine;
use bitflags::bitflags; use bitflags::bitflags;
use log::{debug, trace}; use log::{debug, trace};
use unicode_width::UnicodeWidthChar; use unicode_width::UnicodeWidthChar;
@@ -1556,7 +1558,7 @@ impl<T: EventListener> Handler for Term<T> {
_ => return, _ => return,
}; };
if let Ok(bytes) = base64::decode(base64) { if let Ok(bytes) = Base64.decode(base64) {
if let Ok(text) = String::from_utf8(bytes) { if let Ok(text) = String::from_utf8(bytes) {
self.event_proxy.send_event(Event::ClipboardStore(clipboard_type, text)); self.event_proxy.send_event(Event::ClipboardStore(clipboard_type, text));
} }
@@ -1582,7 +1584,7 @@ impl<T: EventListener> Handler for Term<T> {
self.event_proxy.send_event(Event::ClipboardLoad( self.event_proxy.send_event(Event::ClipboardLoad(
clipboard_type, clipboard_type,
Arc::new(move |text| { Arc::new(move |text| {
let base64 = base64::encode(text); let base64 = Base64.encode(text);
format!("\x1b]52;{};{}{}", clipboard as char, base64, terminator) format!("\x1b]52;{};{}{}", clipboard as char, base64, terminator)
}), }),
)); ));
+15 -12
View File
@@ -4,7 +4,8 @@ use std::ffi::CStr;
use std::fs::File; use std::fs::File;
use std::io::{Error, ErrorKind, Read, Result}; use std::io::{Error, ErrorKind, Read, Result};
use std::mem::MaybeUninit; use std::mem::MaybeUninit;
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::os::fd::OwnedFd;
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::os::unix::net::UnixStream; use std::os::unix::net::UnixStream;
use std::os::unix::process::CommandExt; use std::os::unix::process::CommandExt;
use std::process::{Child, Command, Stdio}; use std::process::{Child, Command, Stdio};
@@ -38,7 +39,7 @@ macro_rules! die {
} }
/// Get raw fds for master/slave ends of a new PTY. /// Get raw fds for master/slave ends of a new PTY.
fn make_pty(size: winsize) -> Result<(RawFd, RawFd)> { fn make_pty(size: winsize) -> Result<(OwnedFd, OwnedFd)> {
let mut window_size = size; let mut window_size = size;
window_size.ws_xpixel = 0; window_size.ws_xpixel = 0;
window_size.ws_ypixel = 0; window_size.ws_ypixel = 0;
@@ -194,12 +195,14 @@ fn default_shell_command(shell: &str, user: &str) -> Command {
/// Create a new TTY and return a handle to interact with it. /// Create a new TTY and return a handle to interact with it.
pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Result<Pty> { pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Result<Pty> {
let (master, slave) = make_pty(window_size.to_winsize())?; let (master, slave) = make_pty(window_size.to_winsize())?;
let master_fd = master.as_raw_fd();
let slave_fd = slave.as_raw_fd();
#[cfg(any(target_os = "linux", target_os = "macos"))] #[cfg(any(target_os = "linux", target_os = "macos"))]
if let Ok(mut termios) = termios::tcgetattr(master) { if let Ok(mut termios) = termios::tcgetattr(&master) {
// Set character encoding to UTF-8. // Set character encoding to UTF-8.
termios.input_flags.set(InputFlags::IUTF8, true); termios.input_flags.set(InputFlags::IUTF8, true);
let _ = termios::tcsetattr(master, SetArg::TCSANOW, &termios); let _ = termios::tcsetattr(&master, SetArg::TCSANOW, &termios);
} }
let user = ShellUser::from_env()?; let user = ShellUser::from_env()?;
@@ -216,9 +219,9 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Resul
// Ownership of fd is transferred to the Stdio structs and will be closed by them at the end of // Ownership of fd is transferred to the Stdio structs and will be closed by them at the end of
// this scope. (It is not an issue that the fd is closed three times since File::drop ignores // this scope. (It is not an issue that the fd is closed three times since File::drop ignores
// error on libc::close.). // error on libc::close.).
builder.stdin(unsafe { Stdio::from_raw_fd(slave) }); builder.stdin(unsafe { Stdio::from_raw_fd(slave_fd) });
builder.stderr(unsafe { Stdio::from_raw_fd(slave) }); builder.stderr(unsafe { Stdio::from_raw_fd(slave_fd) });
builder.stdout(unsafe { Stdio::from_raw_fd(slave) }); builder.stdout(unsafe { Stdio::from_raw_fd(slave_fd) });
// Setup shell environment. // Setup shell environment.
let window_id = window_id.to_string(); let window_id = window_id.to_string();
@@ -237,11 +240,11 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Resul
return Err(Error::new(ErrorKind::Other, "Failed to set session id")); return Err(Error::new(ErrorKind::Other, "Failed to set session id"));
} }
set_controlling_terminal(slave); set_controlling_terminal(slave_fd);
// No longer need slave/master fds. // No longer need slave/master fds.
libc::close(slave); libc::close(slave_fd);
libc::close(master); libc::close(master_fd);
libc::signal(libc::SIGCHLD, libc::SIG_DFL); libc::signal(libc::SIGCHLD, libc::SIG_DFL);
libc::signal(libc::SIGHUP, libc::SIG_DFL); libc::signal(libc::SIGHUP, libc::SIG_DFL);
@@ -274,10 +277,10 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Resul
unsafe { unsafe {
// Maybe this should be done outside of this function so nonblocking // Maybe this should be done outside of this function so nonblocking
// isn't forced upon consumers. Although maybe it should be? // isn't forced upon consumers. Although maybe it should be?
set_nonblocking(master); set_nonblocking(master_fd);
} }
let mut pty = Pty { child, file: unsafe { File::from_raw_fd(master) }, signals }; let mut pty = Pty { child, file: unsafe { File::from_raw_fd(master_fd) }, signals };
pty.on_resize(window_size); pty.on_resize(window_size);
Ok(pty) Ok(pty)
}, },
+1 -1
View File
@@ -365,4 +365,4 @@ _alacritty() {
esac esac
} }
complete -F _alacritty -o bashdefault -o default alacritty complete -F _alacritty -o nosort -o bashdefault -o default alacritty