Skip to content

fix(ohos): honor explicit SDK roots and unversioned SDK layouts - #529

Open
LeenHawk wants to merge 2 commits into
tauri-apps:feat/ohosfrom
LeenHawk:fix/ohos-sdk-env
Open

LeenHawk wants to merge 2 commits into
tauri-apps:feat/ohosfrom
LeenHawk:fix/ohos-sdk-env

Conversation

@LeenHawk

@LeenHawk LeenHawk commented Oct 4, 2026 •

Copy link
Copy Markdown

OpenHarmony builds currently overwrite DEVECO_SDK_HOME by walking three parents from OHOS_HOME. With Huawei's command-line SDK layout (sdk/default/openharmony), this selects the parent of sdk; it also discards a caller's explicit SDK root.

Preserve an explicitly configured DEVECO_SDK_HOME and infer the SDK root for both sdk/default/openharmony and sdk/default/openharmony/<api> layouts. Resolve it during environment initialization and report an error for a path too shallow to infer, instead of panicking during command construction.

Validation: cargo check --lib --offline, rustfmt, and git diff --check passed.

Copilot AI balanced review requested due to automatic review settings October 4, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@LeenHawk

Copy link
Copy Markdown
Author

Could a maintainer review this SDK-root fix and consider merging it into feat/ohos? The current diff is limited to src/open_harmony/env.rs: it preserves an explicit SDK root and supports both versioned and unversioned SDK layouts. The host compile and formatting checks are recorded in the description, and the reported security checks passed. Happy to address any feedback. Thank you!

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