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 2023-10-08 05:29:57 +02:00 committed by GitHub
parent c2f8abecfb
commit 59c63d3738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 359 additions and 334 deletions

View File

@ -24,8 +24,8 @@ tasks:
cargo test
- oldstable: |
cd alacritty
rustup toolchain install --profile minimal 1.65.0
rustup default 1.65.0
rustup toolchain install --profile minimal 1.70.0
rustup default 1.70.0
cargo test
- clippy: |
cd alacritty

View File

@ -34,8 +34,8 @@ tasks:
cargo test
- oldstable: |
cd alacritty
rustup toolchain install --profile minimal 1.65.0
rustup default 1.65.0
rustup toolchain install --profile minimal 1.70.0
rustup default 1.70.0
cargo test
- clippy: |
cd alacritty

View File

@ -19,7 +19,7 @@ jobs:
run: cargo test
- name: Oldstable
run: |
rustup default 1.65.0
rustup default 1.70.0
cargo test
- name: Clippy
run: |

View File

@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### 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`)
### Added

View File

@ -42,7 +42,7 @@ and
[easy](https://github.com/alacritty/alacritty/issues?q=is%3Aopen+is%3Aissue+label%3A%22D+-+easy%22)
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.
Since `alacritty_terminal`'s version always tracks the next release, make sure that the version is

603
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ description = "A fast, cross-platform, OpenGL terminal emulator"
readme = "README.md"
homepage = "https://github.com/alacritty/alacritty"
edition = "2021"
rust-version = "1.65.0"
rust-version = "1.70.0"
[dependencies.alacritty_terminal]
path = "../alacritty_terminal"
@ -32,13 +32,13 @@ glutin = { version = "0.30.4", default-features = false, features = ["egl", "wgl
home = "0.5.5"
libc = "0.2"
log = { version = "0.4", features = ["std", "serde"] }
notify = "5.1.0"
notify = "6.1.1"
once_cell = "1.12"
parking_lot = "0.12.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.8"
toml = "0.7.1"
serde_yaml = "0.9.25"
toml = "0.8.2"
unicode-width = "0.1"
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 }
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.24.0"
cocoa = "0.25.0"
objc = "0.2.2"
[target.'cfg(not(any(target_os="windows", target_os="macos")))'.dependencies]
x11-dl = { version = "2", optional = true }
wayland-client = { version = "0.29.0", features = ["dlopen"], optional = true }
[target.'cfg(windows)'.dependencies]
dirs = "5.0.1"
@ -72,7 +71,7 @@ windows-sys = { version = "0.48", features = [
]}
[target.'cfg(windows)'.build-dependencies]
embed-resource = "1.7.2"
embed-resource = "2.2.0"
[features]
default = ["wayland", "x11"]
@ -82,12 +81,13 @@ x11 = [
"glutin/x11",
"glutin/glx",
"x11-dl",
"png"]
"png",
]
wayland = [
"copypasta/wayland",
"glutin/wayland",
"winit/wayland",
"winit/wayland-dlopen",
"winit/wayland-csd-adwaita-crossfont",
"wayland-client"]
]
nightly = []

View File

@ -23,7 +23,7 @@ fn main() {
.unwrap();
#[cfg(windows)]
embed_resource::compile("./windows/alacritty.rc");
embed_resource::compile("./windows/alacritty.rc", embed_resource::NONE);
}
fn commit_hash() -> Option<String> {

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 !options.dry_run {
#[allow(clippy::redundant_clone)]
let mut options = options.clone();
options.silent = true;
options.dry_run = true;

View File

@ -6,9 +6,9 @@ license = "MIT OR Apache-2.0"
description = "Alacritty configuration abstractions"
homepage = "https://github.com/alacritty/alacritty"
edition = "2021"
rust-version = "1.65.0"
rust-version = "1.70.0"
[dependencies]
log = { version = "0.4.17", features = ["serde"] }
serde = "1.0.163"
toml = "0.7.1"
toml = "0.8.2"

View File

@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
description = "Failure resistant deserialization derive"
homepage = "https://github.com/alacritty/alacritty"
edition = "2021"
rust-version = "1.65.0"
rust-version = "1.70.0"
[lib]
proc-macro = true
@ -23,4 +23,4 @@ version = "0.1.2-dev"
[dev-dependencies]
log = "0.4.11"
serde = { version = "1.0.117", features = ["derive"] }
toml = "0.7.1"
toml = "0.8.2"

View File

@ -7,7 +7,7 @@ description = "Library for writing terminal emulators"
readme = "../README.md"
homepage = "https://github.com/alacritty/alacritty"
edition = "2021"
rust-version = "1.65.0"
rust-version = "1.70.0"
[dependencies.alacritty_config_derive]
path = "../alacritty_config_derive"
@ -18,7 +18,7 @@ path = "../alacritty_config"
version = "0.1.2-dev"
[dependencies]
base64 = "0.13.0"
base64 = "0.21.3"
bitflags = { version = "2.2.1", features = ["serde"] }
home = "0.5.5"
libc = "0.2"
@ -27,18 +27,18 @@ parking_lot = "0.12.0"
polling = "3.0.0"
regex-automata = "0.3.6"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.8"
toml = "0.7.1"
serde_yaml = "0.9.25"
toml = "0.8.2"
unicode-width = "0.1"
vte = { version = "0.12.0", default-features = false, features = ["ansi", "serde"] }
[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"
[target.'cfg(windows)'.dependencies]
piper = "0.2.1"
miow = "0.3.0"
miow = "0.6.0"
windows-sys = { version = "0.48.0", features = [
"Win32_System_Console",
"Win32_Foundation",

View File

@ -4,6 +4,8 @@ use std::ops::{Index, IndexMut, Range};
use std::sync::Arc;
use std::{cmp, mem, ptr, slice, str};
use base64::engine::general_purpose::STANDARD as Base64;
use base64::Engine;
use bitflags::bitflags;
use log::{debug, trace};
use unicode_width::UnicodeWidthChar;
@ -1556,7 +1558,7 @@ impl<T: EventListener> Handler for Term<T> {
_ => return,
};
if let Ok(bytes) = base64::decode(base64) {
if let Ok(bytes) = Base64.decode(base64) {
if let Ok(text) = String::from_utf8(bytes) {
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(
clipboard_type,
Arc::new(move |text| {
let base64 = base64::encode(text);
let base64 = Base64.encode(text);
format!("\x1b]52;{};{}{}", clipboard as char, base64, terminator)
}),
));

View File

@ -4,7 +4,8 @@ use std::ffi::CStr;
use std::fs::File;
use std::io::{Error, ErrorKind, Read, Result};
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::process::CommandExt;
use std::process::{Child, Command, Stdio};
@ -38,7 +39,7 @@ macro_rules! die {
}
/// 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;
window_size.ws_xpixel = 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.
pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Result<Pty> {
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"))]
if let Ok(mut termios) = termios::tcgetattr(master) {
if let Ok(mut termios) = termios::tcgetattr(&master) {
// Set character encoding to UTF-8.
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()?;
@ -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
// this scope. (It is not an issue that the fd is closed three times since File::drop ignores
// error on libc::close.).
builder.stdin(unsafe { Stdio::from_raw_fd(slave) });
builder.stderr(unsafe { Stdio::from_raw_fd(slave) });
builder.stdout(unsafe { Stdio::from_raw_fd(slave) });
builder.stdin(unsafe { Stdio::from_raw_fd(slave_fd) });
builder.stderr(unsafe { Stdio::from_raw_fd(slave_fd) });
builder.stdout(unsafe { Stdio::from_raw_fd(slave_fd) });
// Setup shell environment.
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"));
}
set_controlling_terminal(slave);
set_controlling_terminal(slave_fd);
// No longer need slave/master fds.
libc::close(slave);
libc::close(master);
libc::close(slave_fd);
libc::close(master_fd);
libc::signal(libc::SIGCHLD, 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 {
// Maybe this should be done outside of this function so nonblocking
// 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);
Ok(pty)
},

View File

@ -365,4 +365,4 @@ _alacritty() {
esac
}
complete -F _alacritty -o bashdefault -o default alacritty
complete -F _alacritty -o nosort -o bashdefault -o default alacritty