Skip to content

Fix unused sandbox test import on ARM64 - #1812

Open
simongdavies wants to merge 1 commit into
hyperlight-dev:mainfrom
simongdavies:sdavies-microsoft-fix-issue
Open

Fix unused sandbox test import on ARM64#1812
simongdavies wants to merge 1 commit into
hyperlight-dev:mainfrom
simongdavies:sdavies-microsoft-fix-issue

Conversation

@simongdavies

@simongdavies simongdavies commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

Gate the MultiUseSandbox test import with cfg(any(target_arch = "x86_64", feature = "trace_guest")). Its uses are limited to those configurations. This prevents an unused-import warning in default ARM64 builds.

MultiUseSandbox is used by x86-64 tests and trace_guest helpers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 9, 2026 09:39
@simongdavies simongdavies added area/testing Related to tests or testing infrastructure kind/bugfix For PRs that fix bugs ready-for-review PR is ready for (re-)review labels Sep 9, 2026

Copilot AI 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.

🟢 Approval recommended

The import gating matches all verified MultiUseSandbox references in this test module (x86_64-only tests and trace_guest-only helpers), so it should eliminate the ARM64 warning without affecting compilation.

Pull request overview

This PR adjusts the test-module imports in hyperlight_host so MultiUseSandbox is only imported in configurations where it is actually referenced, avoiding an unused-import warning in default ARM64 (aarch64) builds.

Changes:

  • Gate the use crate::MultiUseSandbox; test import behind cfg(any(target_arch = "x86_64", feature = "trace_guest")).
  • Remove MultiUseSandbox from the unconditional grouped use crate::{ ... } list in the test module.
File summaries
File Description
src/hyperlight_host/src/sandbox/initialized_multi_use.rs Gates the test import of MultiUseSandbox to match the cfg conditions of its uses, preventing ARM64 unused-import warnings.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ludfjig ludfjig 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 but why didn't ci fail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Related to tests or testing infrastructure kind/bugfix For PRs that fix bugs ready-for-review PR is ready for (re-)review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants