Skip to content

update tui Cargo.toml for HarmonyOS build#4566

Open
shenyongqing wants to merge 1 commit into
Hmbown:mainfrom
shenyongqing:fix-build-oh
Open

update tui Cargo.toml for HarmonyOS build#4566
shenyongqing wants to merge 1 commit into
Hmbown:mainfrom
shenyongqing:fix-build-oh

Conversation

@shenyongqing

Copy link
Copy Markdown
  1. move portable-pty crate from target_evn ohos to cfg("unix") in tui Cargo.toml.
  2. the newest portable-pty 0.9 and nix transitived have fulfilled requirements of musl, so both of them lifed from the gate.

Summary

Compiled codewhale on HarmonyOS PC and got the TUI running successfully again.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features
  • cargo test --workspace --all-features

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address

1. move portable-pty crate from target_evn ohos to cfg("unix") in
   tui Cargo.toml.
2. the newest portable-pty 0.9 and nix transitived fulfill requirements
   of musl, so both of them lifed from the gate.
@shenyongqing
shenyongqing requested a review from Hmbown as a code owner July 19, 2026 06:35
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @shenyongqing for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@Hmbown Hmbown left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for testing on a HarmonyOS PC. I audited this exact commit against current main and cannot merge it as written yet.

Two release-blocking points:

  1. Moving portable-pty into cfg(unix) does not enable or repair an OHOS code path. Current main still compiles the terminal_session module, shell PTY imports and variants, child PTY environment path, and persistent terminal tool registration out under cfg(target_env = "ohos"). The added dependency is therefore unused on the OHOS release build; ordinary non-PTY shell execution was already the supported path and has a prior real-SDK cargo-check receipt.

  2. The patch weakens check-ohos-deps.sh while leaving docs/HarmonyOS.md explicitly saying portable-pty and nix 0.28/0.29 are excluded and terminal/* is unavailable. That would leave the guard, documentation, and shipped capability disagreeing.

A focused package check confirms portable-pty 0.9.0 itself resolves for aarch64-unknown-linux-ohos, which is useful evidence, but it does not show that this patch changes Codewhale. Please add the exact rustc -vV / target triple and before-versus-after Codewhale build commands and errors from the HarmonyOS machine. If the intended change is to enable persistent PTY tools, that needs the matching cfg removals, runtime tests, sandbox/clipboard audit, and documentation update under #2970; those residuals are explicitly v0.9.2 scope. If the intent is only to fix a current build, we need a reproducer that fails on current main and passes on this head.

I am leaving the PR and source branch intact so we can incorporate the real hardware evidence safely.

@Hmbown Hmbown added the v0.9.2 Targeting v0.9.2 label Jul 20, 2026
@shenyongqing

shenyongqing commented Jul 21, 2026 via email

Copy link
Copy Markdown
Author

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

Labels

v0.9.2 Targeting v0.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants