From fa13573eaa3812d40a94a04d4b6b32e615531001 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:19:55 +0200 Subject: [PATCH 1/6] Update targets --- README.md | 8 +- src/expr.rs | 2 + src/targets/builtins.rs | 254 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 241 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index ee4c548..0f791a7 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ # `⚙️ cfg-expr` -**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.85.0] are supported.** +**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.86.0] are supported.** [![Build Status](https://github.com/EmbarkStudios/cfg-expr/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/cfg-expr/actions?workflow=CI) [![Crates.io](https://img.shields.io/crates/v/cfg-expr.svg)](https://crates.io/crates/cfg-expr) [![Docs](https://docs.rs/cfg-expr/badge.svg)](https://docs.rs/cfg-expr) [![Minimum Stable Rust Version](https://img.shields.io/badge/Rust%20MSRV-1.70.0-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html) -[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.85.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html) +[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.86.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html) [![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) [![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev) @@ -24,7 +24,7 @@ `cfg-expr` is a crate that can be used to parse and evaluate Rust `cfg()` expressions, both as declarable in Rust code itself, as well in cargo manifests' `[target.'cfg()'.dependencies]` sections. -It contains a list of all builtin targets known to rustc as of [1.85.0] that can be used to determine if a particular cfg expression is satisfiable. +It contains a list of all builtin targets known to rustc as of [1.86.0] that can be used to determine if a particular cfg expression is satisfiable. ```rust use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate}; @@ -110,4 +110,4 @@ at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. -[1.85.0]: (https://forge.rust-lang.org/release/platform-support.html) +[1.86.0]: (https://forge.rust-lang.org/release/platform-support.html) diff --git a/src/expr.rs b/src/expr.rs index b60ef74..16aaf92 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -143,6 +143,8 @@ impl TargetMatcher for target_lexicon::Triple { Mips64Architecture::Mipsisa64r6 | Mips64Architecture::Mipsisa64r6el ) ) + } else if arch == &targ::Arch::amdgpu { + self.architecture == Architecture::AmdGcn } else { match arch.0.parse::() { Ok(a) => match (self.architecture, a) { diff --git a/src/targets/builtins.rs b/src/targets/builtins.rs index 00335d9..42f9ab8 100644 --- a/src/targets/builtins.rs +++ b/src/targets/builtins.rs @@ -10,7 +10,7 @@ use super::*; -pub(crate) const RUSTC_VERSION: &str = "1.85.0"; +pub(crate) const RUSTC_VERSION: &str = "1.86.0"; pub const ALL_BUILTINS: &[TargetInfo] = &[ TargetInfo { @@ -377,6 +377,45 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("aarch64-unknown-nto-qnx710_iosock"), + os: Some(Os::nto), + abi: None, + arch: Arch::aarch64, + env: Some(Env::nto71_iosock), + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, + panic: Panic::unwind, + }, + TargetInfo { + triple: Triple::new_const("aarch64-unknown-nto-qnx800"), + os: Some(Os::nto), + abi: None, + arch: Arch::aarch64, + env: Some(Env::nto80), + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, + panic: Panic::unwind, + }, + TargetInfo { + triple: Triple::new_const("aarch64-unknown-nuttx"), + os: Some(Os::nuttx), + abi: None, + arch: Arch::aarch64, + env: None, + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, + panic: Panic::abort, + }, TargetInfo { triple: Triple::new_const("aarch64-unknown-openbsd"), os: Some(Os::openbsd), @@ -507,6 +546,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("amdgcn-amd-amdhsa"), + os: Some(Os::amdhsa), + abi: None, + arch: Arch::amdgpu, + env: None, + vendor: Some(Vendor::amd), + families: Families::new_const(&[]), + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::abort, + }, TargetInfo { triple: Triple::new_const("arm-linux-androideabi"), os: Some(Os::android), @@ -817,7 +869,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ pointer_width: 32, endian: Endian::little, has_atomics: HasAtomics::atomic_8_16_32_64_ptr, - panic: Panic::abort, + panic: Panic::unwind, }, TargetInfo { triple: Triple::new_const("armv7-sony-vita-newlibeabihf"), @@ -1027,6 +1079,32 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::abort, }, + TargetInfo { + triple: Triple::new_const("armv7a-nuttx-eabi"), + os: Some(Os::nuttx), + abi: Some(Abi::eabi), + arch: Arch::arm, + env: None, + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::abort, + }, + TargetInfo { + triple: Triple::new_const("armv7a-nuttx-eabihf"), + os: Some(Os::nuttx), + abi: Some(Abi::eabihf), + arch: Arch::arm, + env: None, + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::abort, + }, TargetInfo { triple: Triple::new_const("armv7k-apple-watchos"), os: Some(Os::watchos), @@ -1261,6 +1339,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("i586-unknown-redox"), + os: Some(Os::redox), + abi: None, + arch: Arch::x86, + env: Some(Env::relibc), + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, TargetInfo { triple: Triple::new_const("i686-apple-darwin"), os: Some(Os::macos), @@ -1417,19 +1508,6 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, - TargetInfo { - triple: Triple::new_const("i686-unknown-redox"), - os: Some(Os::redox), - abi: None, - arch: Arch::x86, - env: Some(Env::relibc), - vendor: Some(Vendor::unknown), - families: Families::unix, - pointer_width: 32, - endian: Endian::little, - has_atomics: HasAtomics::atomic_8_16_32_64_ptr, - panic: Panic::unwind, - }, TargetInfo { triple: Triple::new_const("i686-unknown-uefi"), os: Some(Os::uefi), @@ -1469,6 +1547,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("i686-win7-windows-gnu"), + os: Some(Os::windows), + abi: None, + arch: Arch::x86, + env: Some(Env::gnu), + vendor: Some(Vendor::win7), + families: Families::windows, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, TargetInfo { triple: Triple::new_const("i686-win7-windows-msvc"), os: Some(Os::windows), @@ -1573,6 +1664,32 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("m68k-unknown-none-elf"), + os: None, + abi: None, + arch: Arch::m68k, + env: None, + vendor: Some(Vendor::unknown), + families: Families::new_const(&[]), + pointer_width: 32, + endian: Endian::big, + has_atomics: HasAtomics::atomic_8_16_32_ptr, + panic: Panic::abort, + }, + TargetInfo { + triple: Triple::new_const("mips-mti-none-elf"), + os: None, + abi: None, + arch: Arch::mips, + env: None, + vendor: Some(Vendor::mti), + families: Families::new_const(&[]), + pointer_width: 32, + endian: Endian::big, + has_atomics: HasAtomics::atomic_8_16_32_ptr, + panic: Panic::abort, + }, TargetInfo { triple: Triple::new_const("mips-unknown-linux-gnu"), os: Some(Os::linux), @@ -1677,6 +1794,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("mipsel-mti-none-elf"), + os: None, + abi: None, + arch: Arch::mips, + env: None, + vendor: Some(Vendor::mti), + families: Families::new_const(&[]), + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_ptr, + panic: Panic::abort, + }, TargetInfo { triple: Triple::new_const("mipsel-sony-psp"), os: Some(Os::psp), @@ -2096,7 +2226,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ TargetInfo { triple: Triple::new_const("riscv32e-unknown-none-elf"), os: None, - abi: None, + abi: Some(Abi::ilp32e), arch: Arch::riscv32, env: None, vendor: Some(Vendor::unknown), @@ -2109,7 +2239,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ TargetInfo { triple: Triple::new_const("riscv32em-unknown-none-elf"), os: None, - abi: None, + abi: Some(Abi::ilp32e), arch: Arch::riscv32, env: None, vendor: Some(Vendor::unknown), @@ -2122,7 +2252,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ TargetInfo { triple: Triple::new_const("riscv32emc-unknown-none-elf"), os: None, - abi: None, + abi: Some(Abi::ilp32e), arch: Arch::riscv32, env: None, vendor: Some(Vendor::unknown), @@ -2662,7 +2792,33 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ families: Families::unix, pointer_width: 32, endian: Endian::little, - has_atomics: HasAtomics::new_const(&[]), + has_atomics: HasAtomics::atomic_8_16_32_ptr, + panic: Panic::abort, + }, + TargetInfo { + triple: Triple::new_const("thumbv7a-nuttx-eabi"), + os: Some(Os::nuttx), + abi: Some(Abi::eabi), + arch: Arch::arm, + env: None, + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::abort, + }, + TargetInfo { + triple: Triple::new_const("thumbv7a-nuttx-eabihf"), + os: Some(Os::nuttx), + abi: Some(Abi::eabihf), + arch: Arch::arm, + env: None, + vendor: Some(Vendor::unknown), + families: Families::unix, + pointer_width: 32, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::abort, }, TargetInfo { @@ -3068,6 +3224,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("x86_64-pc-cygwin"), + os: Some(Os::cygwin), + abi: None, + arch: Arch::x86_64, + env: None, + vendor: Some(Vendor::pc), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, TargetInfo { triple: Triple::new_const("x86_64-pc-nto-qnx710"), os: Some(Os::nto), @@ -3081,6 +3250,32 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("x86_64-pc-nto-qnx710_iosock"), + os: Some(Os::nto), + abi: None, + arch: Arch::x86_64, + env: Some(Env::nto71_iosock), + vendor: Some(Vendor::pc), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, + TargetInfo { + triple: Triple::new_const("x86_64-pc-nto-qnx800"), + os: Some(Os::nto), + abi: None, + arch: Arch::x86_64, + env: Some(Env::nto80), + vendor: Some(Vendor::pc), + families: Families::unix, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, TargetInfo { triple: Triple::new_const("x86_64-pc-solaris"), os: Some(Os::solaris), @@ -3419,6 +3614,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[ has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr, panic: Panic::unwind, }, + TargetInfo { + triple: Triple::new_const("x86_64-win7-windows-gnu"), + os: Some(Os::windows), + abi: None, + arch: Arch::x86_64, + env: Some(Env::gnu), + vendor: Some(Vendor::win7), + families: Families::windows, + pointer_width: 64, + endian: Endian::little, + has_atomics: HasAtomics::atomic_8_16_32_64_ptr, + panic: Panic::unwind, + }, TargetInfo { triple: Triple::new_const("x86_64-win7-windows-msvc"), os: Some(Os::windows), @@ -3546,6 +3754,7 @@ impl super::Abi { pub const eabihf: Abi = Abi::new_const("eabihf"); pub const fortanix: Abi = Abi::new_const("fortanix"); pub const ilp32: Abi = Abi::new_const("ilp32"); + pub const ilp32e: Abi = Abi::new_const("ilp32e"); pub const llvm: Abi = Abi::new_const("llvm"); pub const macabi: Abi = Abi::new_const("macabi"); pub const sim: Abi = Abi::new_const("sim"); @@ -3558,6 +3767,7 @@ impl super::Abi { impl super::Arch { pub const aarch64: Arch = Arch::new_const("aarch64"); + pub const amdgpu: Arch = Arch::new_const("amdgpu"); pub const arm: Arch = Arch::new_const("arm"); pub const arm64ec: Arch = Arch::new_const("arm64ec"); pub const avr: Arch = Arch::new_const("avr"); @@ -3587,11 +3797,13 @@ impl super::Arch { } impl super::Vendor { + pub const amd: Vendor = Vendor::new_const("amd"); pub const apple: Vendor = Vendor::new_const("apple"); pub const espressif: Vendor = Vendor::new_const("espressif"); pub const fortanix: Vendor = Vendor::new_const("fortanix"); pub const ibm: Vendor = Vendor::new_const("ibm"); pub const kmc: Vendor = Vendor::new_const("kmc"); + pub const mti: Vendor = Vendor::new_const("mti"); pub const nintendo: Vendor = Vendor::new_const("nintendo"); pub const nvidia: Vendor = Vendor::new_const("nvidia"); pub const pc: Vendor = Vendor::new_const("pc"); @@ -3607,8 +3819,10 @@ impl super::Vendor { impl super::Os { pub const aix: Os = Os::new_const("aix"); + pub const amdhsa: Os = Os::new_const("amdhsa"); pub const android: Os = Os::new_const("android"); pub const cuda: Os = Os::new_const("cuda"); + pub const cygwin: Os = Os::new_const("cygwin"); pub const dragonfly: Os = Os::new_const("dragonfly"); pub const emscripten: Os = Os::new_const("emscripten"); pub const espidf: Os = Os::new_const("espidf"); @@ -3673,6 +3887,8 @@ impl super::Env { pub const newlib: Env = Env::new_const("newlib"); pub const nto70: Env = Env::new_const("nto70"); pub const nto71: Env = Env::new_const("nto71"); + pub const nto71_iosock: Env = Env::new_const("nto71_iosock"); + pub const nto80: Env = Env::new_const("nto80"); pub const ohos: Env = Env::new_const("ohos"); pub const p1: Env = Env::new_const("p1"); pub const p2: Env = Env::new_const("p2"); From 6ae9f22e2c381c90d70a8493cb26f457f8fc5b73 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:22:32 +0200 Subject: [PATCH 2/6] Update crates --- Cargo.lock | 10 +++++----- Cargo.toml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ef46ce..fd752f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "bstr" @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" +checksum = "b5b441962c817e33508847a22bd82f03a30cff43642dc2fae8b050566121eb9a" dependencies = [ "console", "similar", @@ -124,9 +124,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "syn" diff --git a/Cargo.toml b/Cargo.toml index 8d11a8f..57efd6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,8 @@ default = [] targets = ["target-lexicon"] [dependencies] -smallvec = "1.8" +smallvec = "1.14" target-lexicon = { version = "=0.13.2", optional = true } [dev-dependencies] -similar-asserts = "1.1" +similar-asserts = "1.7" From b821466a60cc5d5c084407b6ba5c853843aa64fa Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:22:49 +0200 Subject: [PATCH 3/6] Update edition --- Cargo.toml | 4 ++-- examples/eval.rs | 2 +- src/expr.rs | 8 ++++---- src/expr/parser.rs | 4 ++-- tests/eval.rs | 4 ++-- tests/parser.rs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 57efd6d..c86b481 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,10 +7,10 @@ authors = [ "Embark ", "Jake Shadle ", ] -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" readme = "README.md" -rust-version = "1.70.0" +rust-version = "1.85.0" documentation = "https://docs.rs/cfg-expr" homepage = "https://github.com/EmbarkStudios/cfg-expr" keywords = ["cargo", "rustc", "cfg"] diff --git a/examples/eval.rs b/examples/eval.rs index a3f17b8..e8fe584 100644 --- a/examples/eval.rs +++ b/examples/eval.rs @@ -1,4 +1,4 @@ -use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate}; +use cfg_expr::{Expression, Predicate, targets::get_builtin_target_by_triple}; fn main() { let specific = Expression::parse( diff --git a/src/expr.rs b/src/expr.rs index 16aaf92..ad17b27 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -100,10 +100,10 @@ impl TargetMatcher for target_lexicon::Triple { #[allow(clippy::cognitive_complexity)] #[allow(clippy::match_same_arms)] fn matches(&self, tp: &TargetPredicate) -> bool { - use target_lexicon::*; use TargetPredicate::{ Abi, Arch, Endian, Env, Family, HasAtomic, Os, Panic, PointerWidth, Vendor, }; + use target_lexicon::*; const NUTTX: target_lexicon::Vendor = target_lexicon::Vendor::Custom(target_lexicon::CustomVendor::Static("nuttx")); @@ -265,9 +265,9 @@ impl TargetMatcher for target_lexicon::Triple { Family(fam) => { use OperatingSystem::{ Aix, AmdHsa, Bitrig, Cloudabi, Cuda, Darwin, Dragonfly, Emscripten, Espidf, - Freebsd, Fuchsia, Haiku, Hermit, Horizon, Hurd, Illumos, L4re, Linux, MacOSX, - Nebulet, Netbsd, None_, Openbsd, Redox, Solaris, TvOS, Uefi, Unknown, VisionOS, - VxWorks, Wasi, WasiP1, WasiP2, WatchOS, Windows, IOS, + Freebsd, Fuchsia, Haiku, Hermit, Horizon, Hurd, IOS, Illumos, L4re, Linux, + MacOSX, Nebulet, Netbsd, None_, Openbsd, Redox, Solaris, TvOS, Uefi, Unknown, + VisionOS, VxWorks, Wasi, WasiP1, WasiP2, WatchOS, Windows, }; match self.operating_system { diff --git a/src/expr/parser.rs b/src/expr/parser.rs index 0f663a0..4b5014e 100644 --- a/src/expr/parser.rs +++ b/src/expr/parser.rs @@ -1,8 +1,8 @@ use crate::{ error::{ParseError, Reason}, expr::{ - lexer::{Lexer, Token}, ExprNode, Expression, Func, InnerPredicate, + lexer::{Lexer, Token}, }, }; use smallvec::SmallVec; @@ -200,7 +200,7 @@ impl Expression { "target_pointer_width", "target_vendor", ]), - }) + }); } }; diff --git a/tests/eval.rs b/tests/eval.rs index c418389..213457b 100644 --- a/tests/eval.rs +++ b/tests/eval.rs @@ -1,7 +1,7 @@ use cfg_expr::{ - expr::{Predicate, TargetMatcher}, - targets::{get_builtin_target_by_triple, ALL_BUILTINS as all}, Expression, TargetPredicate, + expr::{Predicate, TargetMatcher}, + targets::{ALL_BUILTINS as all, get_builtin_target_by_triple}, }; struct Target { diff --git a/tests/parser.rs b/tests/parser.rs index d2cb873..f1b7525 100644 --- a/tests/parser.rs +++ b/tests/parser.rs @@ -1,8 +1,8 @@ use cfg_expr::{ + Expression, ParseError, error::Reason, expr::{Predicate as P, TargetPredicate as TP}, targets::*, - Expression, ParseError, }; macro_rules! test_validate { From e799e84df46cc7a61773271e19889aa074b6ce0a Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:22:54 +0200 Subject: [PATCH 4/6] Update CI --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2023f3d..7499cd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ name: CI jobs: lint: name: Lint - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: "clippy, rustfmt" @@ -32,10 +32,10 @@ jobs: name: Test strategy: matrix: - toolchain: [1.70.0, stable] - runs-on: ubuntu-22.04 + toolchain: [1.85.0, stable] + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -51,16 +51,16 @@ jobs: deny-check: name: cargo-deny - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: actions/checkout@v4 + - uses: EmbarkStudios/cargo-deny-action@v2 publish-check: name: Publish Check - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo fetch - name: cargo publish check From 48014a548c831ee0ac47c1faf0d98e45d19c2ca0 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:25:46 +0200 Subject: [PATCH 5/6] Fix deny --- deny.toml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deny.toml b/deny.toml index 3228869..655cfef 100644 --- a/deny.toml +++ b/deny.toml @@ -1,7 +1,7 @@ +[graph] +all-features = true + [advisories] -vulnerability = "deny" -unmaintained = "deny" -notice = "deny" ignore = [ ] @@ -13,9 +13,6 @@ unknown-registry = "deny" unknown-git = "deny" [licenses] -unlicensed = "deny" -allow-osi-fsf-free = "neither" -copyleft = "deny" # We want really high confidence when inferring licenses from text confidence-threshold = 0.93 allow = [ From 93371c6f918107d2d764a920148ba2cbcec0924b Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 3 Apr 2025 13:29:57 +0200 Subject: [PATCH 6/6] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08dbd5b..21a745b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - ReleaseDate +### Changed +- [PR#78](https://github.com/EmbarkStudios/cfg-expr/pull/78) updated the builtin target list to 1.86.0. +- [PR#78](https://github.com/EmbarkStudios/cfg-expr/pull/78) changed the MSRV to 1.85.0 and the edition to 2024. + ## [0.18.0] - 2025-02-20 ### Changed - [PR#77](https://github.com/EmbarkStudios/cfg-expr/pull/77) updated the builtin target list to 1.84.1 and 1.85.0.