Format & use syntect regex-fancy

The onig crate no longer builds
in CI with cargo-zigbuild.
This commit is contained in:
Luke Street 2024-03-13 18:30:15 -06:00
parent d727110262
commit 7fd039722d
5 changed files with 31 additions and 37 deletions

55
Cargo.lock generated
View File

@ -135,6 +135,21 @@ dependencies = [
"serde",
]
[[package]]
name = "bit-set"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
[[package]]
name = "bitflags"
version = "1.3.2"
@ -345,6 +360,16 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "fancy-regex"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2"
dependencies = [
"bit-set",
"regex",
]
[[package]]
name = "filetime"
version = "0.2.23"
@ -677,28 +702,6 @@ version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "onig"
version = "6.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f"
dependencies = [
"bitflags",
"libc",
"once_cell",
"onig_sys",
]
[[package]]
name = "onig_sys"
version = "69.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7"
dependencies = [
"cc",
"pkg-config",
]
[[package]]
name = "overload"
version = "0.1.1"
@ -736,12 +739,6 @@ version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]]
name = "pkg-config"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "ppc750cl"
version = "0.2.0"
@ -1044,10 +1041,10 @@ checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1"
dependencies = [
"bincode",
"bitflags",
"fancy-regex",
"flate2",
"fnv",
"once_cell",
"onig",
"regex-syntax 0.8.2",
"serde",
"serde_derive",

View File

@ -66,7 +66,7 @@ serde_yaml = "0.9.32"
sha-1 = "0.10.1"
smallvec = "1.13.1"
supports-color = "3.0.0"
syntect = { version = "5.2.0", features = ["parsing", "regex-onig", "dump-load"], default-features = false }
syntect = { version = "5.2.0", features = ["parsing", "regex-fancy", "dump-load"], default-features = false }
tracing = "0.1.40"
tracing-attributes = "0.1.27"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }

View File

@ -8,8 +8,7 @@ use std::{
use anyhow::{anyhow, bail, Context, Result};
use argp::FromArgs;
use object::{
elf, Object, ObjectSection, ObjectSymbol, RelocationFlags, RelocationTarget,
Section,
elf, Object, ObjectSection, ObjectSymbol, RelocationFlags, RelocationTarget, Section,
};
use syntect::{
highlighting::{Color, HighlightIterator, HighlightState, Highlighter, Theme, ThemeSet},

View File

@ -12,9 +12,8 @@ use objdiff_core::obj::split_meta::{SplitMeta, SPLITMETA_SECTION};
use object::{
elf,
write::{Mangling, SectionId, SymbolId},
FileFlags, Object, ObjectSection, ObjectSymbol,
RelocationTarget, SectionFlags, SectionIndex, SectionKind, SymbolFlags, SymbolIndex,
SymbolKind, SymbolScope, SymbolSection,
FileFlags, Object, ObjectSection, ObjectSymbol, RelocationTarget, SectionFlags, SectionIndex,
SectionKind, SymbolFlags, SymbolIndex, SymbolKind, SymbolScope, SymbolSection,
};
use crate::{

View File

@ -18,8 +18,7 @@ use object::{
StringId,
},
Architecture, Endianness, Object, ObjectKind, ObjectSection, ObjectSymbol, Relocation,
RelocationFlags, RelocationTarget, SectionKind, Symbol, SymbolKind,
SymbolScope, SymbolSection,
RelocationFlags, RelocationTarget, SectionKind, Symbol, SymbolKind, SymbolScope, SymbolSection,
};
use crate::{