Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: pin MSRV to 1.73 and clarify policy #902

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Fixes**

- Restore support for older Rust versions and clarify MSRV policy. ([#902](https://github.com/getsentry/symbolic/pull/902))

## 12.14.0

**Features**
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
resolver = "2"
members = ["symbolic*", "examples/*"]

[workspace.package]
edition = "2021"
rust-version = "1.73"

[workspace.dependencies]
anyhow = "1.0.32"
anylog = "0.6.4"
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ To run these examples, use the `run` script. For example:
./run minidump_stackwalk mini.dmp /path/to/files
```

## Supported Rust Versions

Symbolic tries to not break MSRV compatibility but makes no guarantees about the Rust version.
Although you can expect Rust version compatibility of **at least 6 months**.

The current MSRV is 1.73.

## License

Symbolic is licensed under the MIT license. It uses some Apache2 licensed code
Expand Down
3 changes: 2 additions & 1 deletion symbolic-cfi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ repository = "https://github.com/getsentry/symbolic"
description = """
A library to process call frame information
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

[dependencies]
symbolic-common = { version = "12.14.0", path = "../symbolic-common" }
Expand Down
3 changes: 2 additions & 1 deletion symbolic-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ description = """
Common types and utilities for symbolic, a library to symbolicate and process
stack traces from native applications, minidumps or minified JavaScript.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion symbolic-common/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn is_windows_driveletter<P: AsRef<[u8]>>(path: P) -> bool {

if let (Some(drive_letter), Some(b':')) = (path.first(), path.get(1)) {
if drive_letter.is_ascii_alphabetic() {
return path.get(2).is_none_or(is_windows_separator);
return path.get(2).map_or(true, is_windows_separator);
}
}

Expand Down
3 changes: 2 additions & 1 deletion symbolic-debuginfo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ description = """
A library to inspect and load DWARF debugging information from binaries, such
as Mach-O or ELF.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

exclude = ["tests/**/*"]

Expand Down
3 changes: 2 additions & 1 deletion symbolic-demangle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ description = """
A library to demangle symbols from various languages and compilers.
"""
build = "build.rs"
edition = "2021"
edition.workspace = true
rust-version.workspace = true

exclude = ["tests/**/*"]

Expand Down
3 changes: 2 additions & 1 deletion symbolic-il2cpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ repository = "https://github.com/getsentry/symbolic"
description = """
A library for parsing il2cpp line mappings.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

[dependencies]
indexmap = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion symbolic-ppdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ repository = "https://github.com/getsentry/symbolic"
description = """
A library for parsing and performing lookups on Portable PDB files.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

exclude = ["tests/**/*"]

Expand Down
3 changes: 2 additions & 1 deletion symbolic-symcache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ description = """
An optimized cache file for fast and memory efficient lookup of symbols and
stack frames in debugging information.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

exclude = ["tests/**/*"]

Expand Down
12 changes: 8 additions & 4 deletions symbolic-symcache/src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ impl<'data> Iterator for Functions<'data> {
}
}

function.inspect(|_f| {
if function.is_some() {
self.function_idx += 1;
})
}

function
}
}

Expand Down Expand Up @@ -265,9 +267,11 @@ impl<'data> Iterator for Files<'data> {
type Item = File<'data>;

fn next(&mut self) -> Option<Self::Item> {
self.cache.get_file(self.file_idx).inspect(|_f| {
let file = self.cache.get_file(self.file_idx);
if file.is_some() {
self.file_idx += 1;
})
}
file
}
}

Expand Down
13 changes: 11 additions & 2 deletions symbolic-symcache/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,16 @@ impl<'a> SymCacheConverter<'a> {
// Emit our source location at current_address if current_address is not covered by an inlinee.
if next_inline
.as_ref()
.is_none_or(|next| next.start > current_address)
.map_or(true, |next| next.start > current_address)
{
// "insert_range"
self.ranges.insert(current_address, source_location.clone());
}

// If there is an inlinee range covered by this line record, turn this line into that
// call's "call line". Make a `call_location_idx` for it and store it in `callee_call_locations`.
if let Some(inline_range) = next_inline.take_if(|next| next.start < line_range_end)
if let Some(inline_range) =
take_if(&mut next_inline, |next| next.start < line_range_end)
{
// "make_call_location"
let (call_location_idx, _) =
Expand Down Expand Up @@ -589,6 +590,14 @@ fn line_boundaries(address: u64, size: Option<u64>) -> (u32, u32) {
(start, end)
}

fn take_if<T>(opt: &mut Option<T>, predicate: impl FnOnce(&mut T) -> bool) -> Option<T> {
if opt.as_mut().is_some_and(predicate) {
opt.take()
} else {
None
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
3 changes: 2 additions & 1 deletion symbolic-unreal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ repository = "https://github.com/getsentry/symbolic"
description = """
Parsing and processing utilities for Unreal Engine 4 crash files.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

exclude = ["tests/**/*"]

Expand Down
3 changes: 2 additions & 1 deletion symbolic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ description = """
A library to symbolicate and process stack traces from native applications,
minidumps, Unreal Engine 4 or minified JavaScript.
"""
edition = "2021"
edition.workspace = true
rust-version.workspace = true

[package.metadata.docs.rs]
all-features = true
Expand Down
Loading