Skip to content

linux: Exclude target_env = "ohos" from desktop Linux crates - #473

Draft
richerfu wants to merge 1 commit into
longbridge:mainfrom
richerfu:ohos/avoid-linux-target
Draft

richerfu wants to merge 1 commit into
longbridge:mainfrom
richerfu:ohos/avoid-linux-target

Conversation

@richerfu

@richerfu richerfu commented Oct 26, 2026 •

Copy link
Copy Markdown

OHOS targets report target_os = "linux". Desktop Linux dependencies and entrypoints must also exclude target_env = "ohos", otherwise an OHOS build resolves GTK/WebKit and desktop runners.

This changes the target guards in nsh-platform-linux, nsh-linux-host and nsh-linux-app, preserving the current Linux feature selections.

Part 1 of the draft stack: #473 → #474 → #475. All three target main; the later PRs include the earlier commits. Rebased onto 201d780a and kept as drafts for upstream review.

Validation

Validation on the combined stack:

  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo xtask clippy-ohos (default, dev, API 23 and API 26)
  • cargo xtask ohos --dev (API 20 compilation, linking and SDK staging)
  • uv run --with PyYAML python .github/ci/paths.py

Desktop Linux execution was not repeated on this macOS host. Full-workspace formatting reports existing differences in unchanged upstream files; the changed OHOS files are formatted.

cargo xtask compat: 19 checks passed; checkout_apps_run failed in four existing scenarios (base Bold frame, macOS Dock tab contents, gallery Stocks row height, and hopper flight-history text). All four failures reproduce identically on unmodified upstream e239619b (the previous base); no fixture or demo was changed to suppress them.

After the final main refresh, cargo test -p nsh-core -p nsh-engine -p nsh-platform-ohos passed, including all 68 OHOS host tests. DataTable column interaction tests passed on upstream and this stack with --trace: 15 commits and 428 mount items in both runs.

@richerfu
richerfu force-pushed the ohos/avoid-linux-target branch from 6e2a42e to 8185068 Compare October 30, 2026 13:45

This branch has not been deployed

No deployments
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.

1 participant