Skip to content

fix: move #[cfg(target_os = linux)] from fn new() to impl block#44

Merged
smalis-msft merged 1 commit intomicrosoft:mainfrom
ludfjig:fix_build
Mar 9, 2026
Merged

fix: move #[cfg(target_os = linux)] from fn new() to impl block#44
smalis-msft merged 1 commit intomicrosoft:mainfrom
ludfjig:fix_build

Conversation

@ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Mar 9, 2026

The impl block references Linux-only types (ProcessView, LinuxProcessMemoryReader) unconditionally, breaking compilation on non-Linux targets on v2.0.1. (see hyperlight-dev/hyperlight#1288 for an example)

aside: Would you be open to adding windows comiplation/tests to CI to prevent future breakage?

The impl block references Linux-only types (ProcessView,
LinuxProcessMemoryReader) unconditionally, breaking compilation
on non-Linux targets.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@smalis-msft
Copy link
Collaborator

Whoops, thanks! And sure, if you've got the time to add them I'd accept it.

@smalis-msft smalis-msft enabled auto-merge (squash) March 9, 2026 18:17
@smalis-msft smalis-msft merged commit e1243c2 into microsoft:main Mar 9, 2026
7 checks passed
@smalis-msft
Copy link
Collaborator

v2.0.2 published with this fix.

@ludfjig
Copy link
Contributor Author

ludfjig commented Mar 9, 2026

thanks a lot!

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