Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bug(driver-mxc): test helper fails to compile after gateway-name argument

未关闭 适合新手
#4,191 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@feloy 已经在做这个了。

开始于 2026年10月5日。

  • #4194 来自 @feloy —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
testing

调研方向

阅读 crates/openshell-driver-mxc/src/driver.rs 第 458 行附近的代码,并将 new_mocked 与其他 MXC 测试构造函数进行比较。运行适用于 x64 或 ARM64 的 Windows lint 任务以重现编译失败;当 MXC 库测试目标编译成功且 Windows 测试步骤能够运行时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

state:triage-needed

User Story

I use an OpenShell source checkout on Windows to run the project's MSVC validation. Running windows:lint:x64 directly encountered a compile error in the MXC driver's test helper, so I cannot complete Windows lint or reach the test step.

Problem Statement

MxcComputeBackend::new now requires (gateway_name, config), but the test-only MxcComputeBackend::new_mocked helper still calls Self::new(config) in crates/openshell-driver-mxc/src/driver.rs:458. The Windows lint task includes all targets, so it compiles this #[cfg(test)] call and fails with E0277 and E0061.

Impact / Why This Matters

The current OpenShell source cannot complete Windows MSVC lint on x64; the same test target is part of the ARM64 lint task. Validation stops before Windows tests can run. Developers must patch the source locally to continue, which means the checked-in validation lane cannot confirm unrelated changes.

Acceptance Criteria

  • The MXC library test target compiles during Windows MSVC lint on x64 and ARM64 without E0277 or E0061.
  • The mocked backend uses a gateway name consistent with the driver's other test constructors.
  • The Windows MSVC test steps can run after lint passes.

Reproduction Steps

  1. Check out OpenShell main at 71c3cd957abef062eb7f37010056717cd49f2ed3 on a Windows machine with the repository's MSVC prerequisites.
  2. Run mise run --skip-tools windows:lint:x64. On a native ARM64 machine, use windows:lint:arm64.
  3. Observe the compile errors at crates/openshell-driver-mxc/src/driver.rs:458.

Environment

  • OpenShell: main at 71c3cd957abef062eb7f37010056717cd49f2ed3
  • OS: Windows, x64 MSVC validation
  • Rust: 1.95.0 from rust-toolchain.toml
  • Deployment: none required; this is a source checkout lint failure

Logs

error[E0277]: the trait bound `String: From<MxcComputeConfig>` is not satisfied
  --> crates/openshell-driver-mxc/src/driver.rs:458:37
error[E0061]: this function takes 2 arguments but 1 argument was supplied
  --> crates/openshell-driver-mxc/src/driver.rs:458:27
458 | let mut backend = Self::new(config);

Investigation

Commit a875add23 in PR #3264 added the gateway-name parameter to MxcComputeBackend::new for ETW event attribution but did not update new_mocked. The MXC implementation is gated to Windows, so non-Windows checks do not compile this call. Other MXC tests already use openshell_core::config::DEFAULT_GATEWAY_NAME when constructing the backend.

主要语言
Rust
星标
13.2k
派生
1.6k
平均合并
1 天 19 小时
30 天内合并 PR
330

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。