8000 Isolated Processes 12: Refactor Result, visiblity, wrappers by marti4d · Pull Request #200 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content

Isolated Processes 12: Refactor Result, visiblity, wrappers - #200

Merged
marti4d merged 1 commit into
mainfrom
isolated_process/12-result-and-visibility
Aug 17, 2026
Merged

marti4d merged 1 commit into
mainfrom
isolated_process/12-result-and-visibility

Conversation

@marti4d
@marti4d marti4d commented Aug 10, 2026
Copy link
Copy Markdown
Collaborator

There are about to be a lot of methods returning Result<T, Error>, so let's just start using some specialized results to avoid repeating ourselves.

Also, some of the visiblity on things could be cleaned up.

And let's centralize some of the wrappers for things like FDs so the remote end can reuse them.

There's not much to this, but it makes other reviews noisy so I thought it best to separate it out.

@marti4d
marti4d force-pushed the isolated_process/12-result-and-visibility branch from c853048 to 4204f72 Compare August 11, 2026 17:19
@Jake-Shadle
Jake-Shadle removed their request for review August 12, 2026 08:22
Comment thread src/linux/auxv/mod.rs

let auxv_path = format!("/proc/{pid}/auxv");
let auxv_file = process_inspector
.read_file(&auxv_path)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if you're confused about why I had to do this (explicitly make every API require a PathBuf instead of taking a impl Into<PathBuf>), it's because we're about to make ProcessInspector a dyn Trait -- And dyn Traits can't have generic arguments.

Unfortunately, this means I have to go to every call site and write some variation of .into(), PathBuf::from(), path.clone(), etc.

Shitty, but... Whatcha gonna do?

@marti4d
marti4d commented Aug 12, 2026
Copy link
Copy Markdown
Collaborator Author

@gabrielesvelto - This is a lot of small changes, but honestly there's not a whole lot to see here - Mostly just replacing a bunch of uses of Result<T, Error> with a specialized typedef, tightening up visibility of symbols, fixing the ptrace unit tests to run one-at-a-time (as it turns out, they all race each other to create and destroy threads, but we often don't see it because the threads roughly all start at the same time and run fast enough to not witness each other's destruction), and I finally make the soft error test less sensitive (it was annoying that it blew up any time anyone changed the structure of error enums).

@gabrielesvelto gabrielesvelto left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

There are about to be a lot of methods returning Result<T, Error>, so let's
just start using some specialized results to avoid repeating ourselves.

Also, some of the visiblity on things could be cleaned up.

And let's centralize some of the wrappers for things like FDs so the remote end
can reuse them.

There's not much to this, but it makes other reviews noisy so I thought it
best to separate it out.
@marti4d
marti4d force-pushed the isolated_process/12-result-and-visibility branch from 4204f72 to b57e996 Compare August 17, 2026 15:15
Base automatically changed from isolated_process/11-drop-fail-handler to main August 17, 2026 18:35
@marti4d
marti4d merged commit 6b78b86 into main Aug 17, 2026
29 of 32 checks passed
@marti4d
marti4d deleted the isolated_process/12-result-and-visibility branch August 17, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0