1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Update xdg and dirs crate

The recent version on xdg crate moved to home crate which is used
by cargo. Thus to query for home directory we can use the home
dependency instead which is smaller.
This commit is contained in:
Kirill Chibisov 2023-05-16 07:41:20 +03:00
parent b1feba6916
commit 04811c674b
6 changed files with 130 additions and 47 deletions

113
Cargo.lock generated
View file

@ -26,6 +26,7 @@ dependencies = [
"fnv",
"gl_generator",
"glutin",
"home",
"libc",
"log",
"notify",
@ -39,7 +40,7 @@ dependencies = [
"serde_yaml",
"unicode-width",
"wayland-client",
"windows-sys 0.36.1",
"windows-sys 0.45.0",
"winit",
"x11-dl",
"xdg",
@ -76,7 +77,7 @@ dependencies = [
"alacritty_config_derive",
"base64",
"bitflags 2.2.1",
"dirs",
"home",
"libc",
"log",
"mio 0.6.23",
@ -480,22 +481,23 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
[[package]]
name = "dirs"
version = "4.0.0"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"winapi 0.3.9",
"windows-sys 0.48.0",
]
[[package]]
@ -778,6 +780,15 @@ dependencies = [
"libc",
]
[[package]]
name = "home"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "indexmap"
version = "1.9.1"
@ -1266,6 +1277,12 @@ version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "orbclient"
version = "0.3.42"
@ -2070,12 +2087,12 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.1",
"windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.1",
"windows_x86_64_msvc 0.42.1",
]
@ -2085,7 +2102,16 @@ version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
"windows-targets",
"windows-targets 0.42.1",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets 0.48.0",
]
[[package]]
@ -2094,21 +2120,42 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.1",
"windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.1",
"windows_x86_64_msvc 0.42.1",
]
[[package]]
name = "windows-targets"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
dependencies = [
"windows_aarch64_gnullvm 0.48.0",
"windows_aarch64_msvc 0.48.0",
"windows_i686_gnu 0.48.0",
"windows_i686_msvc 0.48.0",
"windows_x86_64_gnu 0.48.0",
"windows_x86_64_gnullvm 0.48.0",
"windows_x86_64_msvc 0.48.0",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
@ -2121,6 +2168,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
@ -2133,6 +2186,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
[[package]]
name = "windows_i686_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
@ -2145,6 +2204,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
[[package]]
name = "windows_i686_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
@ -2157,12 +2222,24 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
@ -2175,6 +2252,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "winit"
version = "0.28.6"
@ -2292,11 +2375,11 @@ dependencies = [
[[package]]
name = "xdg"
version = "2.4.1"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6"
checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee"
dependencies = [
"dirs",
"home",
]
[[package]]

View file

@ -23,24 +23,24 @@ path = "../alacritty_config"
version = "0.1.2-dev"
[dependencies]
clap = { version = "3.0.0", features = ["derive", "env"] }
log = { version = "0.4", features = ["std", "serde"] }
fnv = "1"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.8"
serde_json = "1"
glutin = { version = "0.30.4", default-features = false, features = ["egl", "wgl"] }
winit = { version = "0.28.2", default-features = false, features = ["serde"] }
notify = "5.1.0"
parking_lot = "0.12.0"
crossfont = { version = "0.5.0", features = ["force_system_fontconfig"] }
copypasta = { version = "0.8.1", default-features = false }
raw-window-handle = "0.5.0"
libc = "0.2"
unicode-width = "0.1"
bitflags = "2.2.1"
dirs = "4.0.0"
clap = { version = "3.0.0", features = ["derive", "env"] }
copypasta = { version = "0.8.1", default-features = false }
crossfont = { version = "0.5.0", features = ["force_system_fontconfig"] }
fnv = "1"
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"
once_cell = "1.12"
parking_lot = "0.12.0"
raw-window-handle = "0.5.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.8"
unicode-width = "0.1"
winit = { version = "0.28.2", default-features = false, features = ["serde"] }
[build-dependencies]
gl_generator = "0.14.0"
@ -49,13 +49,12 @@ gl_generator = "0.14.0"
clap_complete = "3.0.0"
[target.'cfg(not(windows))'.dependencies]
xdg = "2.4.0"
xdg = "2.5.0"
[target.'cfg(not(target_os = "macos"))'.dependencies]
png = { version = "0.17.5", default-features = false, optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
raw-window-handle = "0.5.0"
cocoa = "0.24.0"
objc = "0.2.2"
@ -64,7 +63,8 @@ x11-dl = { version = "2", optional = true }
wayland-client = { version = "0.29.0", features = ["dlopen"], optional = true }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.36", features = [
dirs = "5.0.1"
windows-sys = { version = "0.45", features = [
"Win32_UI_WindowsAndMessaging",
"Win32_System_Threading",
"Win32_System_Console",

View file

@ -236,7 +236,7 @@ fn load_imports(config: &Value, config_paths: &mut Vec<PathBuf>, recursion_limit
};
// Resolve paths relative to user's home directory.
if let (Ok(stripped), Some(home_dir)) = (path.strip_prefix("~/"), dirs::home_dir()) {
if let (Ok(stripped), Some(home_dir)) = (path.strip_prefix("~/"), home::home_dir()) {
path = home_dir.join(stripped);
}

View file

@ -151,7 +151,7 @@ fn alacritty(options: Options) -> Result<(), Box<dyn Error>> {
// Switch to home directory.
#[cfg(target_os = "macos")]
env::set_current_dir(dirs::home_dir().unwrap()).unwrap();
env::set_current_dir(home::home_dir().unwrap()).unwrap();
// Set macOS locale.
#[cfg(target_os = "macos")]

View file

@ -18,19 +18,19 @@ path = "../alacritty_config"
version = "0.1.2-dev"
[dependencies]
libc = "0.2"
base64 = "0.13.0"
bitflags = { version = "2.2.1", features = ["serde"] }
parking_lot = "0.12.0"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.8"
vte = { version = "0.10.0", default-features = false }
home = "0.5.5"
libc = "0.2"
log = "0.4"
mio = "0.6.20"
mio-extras = "2"
log = "0.4"
unicode-width = "0.1"
base64 = "0.13.0"
parking_lot = "0.12.0"
regex-automata = "0.1.9"
dirs = "4.0.0"
serde = { version = "1", features = ["derive", "rc"] }
serde_yaml = "0.8"
unicode-width = "0.1"
vte = { version = "0.10.0", default-features = false }
[target.'cfg(unix)'.dependencies]
nix = "0.24.1"
@ -38,8 +38,8 @@ signal-hook = "0.3.10"
signal-hook-mio = { version = "0.2.1", features = ["support-v0_6"] }
[target.'cfg(windows)'.dependencies]
miow = "0.3"
mio-anonymous-pipes = "0.2"
miow = "0.3"
windows-sys = { version = "0.36", features = [
"Win32_System_Console",
"Win32_Foundation",

View file

@ -98,7 +98,7 @@ fn terminfo_exists(terminfo: &str) -> bool {
if let Some(dir) = env::var_os("TERMINFO") {
check_path!(PathBuf::from(&dir));
} else if let Some(home) = dirs::home_dir() {
} else if let Some(home) = home::home_dir() {
check_path!(home.join(".terminfo"));
}