fix(dream_skin): fix Windows-only compile error breaking Windows CI - #2024
Open
LeoLin990405 wants to merge 1 commit into
Open
fix(dream_skin): fix Windows-only compile error breaking Windows CI#2024LeoLin990405 wants to merge 1 commit into
LeoLin990405 wants to merge 1 commit into
Conversation
The `#[cfg(windows)]` normalized_identity_string calls `raw.into_owned()` where `raw` is already an owned String (from `to_string_lossy().replace(..)`), so it fails to compile on Windows with `error[E0599]: no method named `into_owned` found for struct String`. This breaks the Windows artifacts CI on main (green at 7385664, failing since). Return `raw` directly. Verified via `rustc --target x86_64-pc-windows-msvc`: the original reproduces E0599, the fix type-checks clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
main's Windows artifacts CI has been failing since7385664(last green) with a compile error:The
#[cfg(windows)]normalized_identity_stringbuildsrawas an ownedString(
path.to_string_lossy().replace('/', "\\")), then callsraw.into_owned()in the finalunwrap_or_else.Stringhas nointo_owned()(that'sCow/Borrow), so it fails tocompile — but only on Windows, since the function is
#[cfg(windows)](non-Windows buildsuse a separate branch, so macOS/Linux CI stays green and the break is easy to miss).
This blocks the Windows job for every PR rebased onto current
main.Fix
Return
rawdirectly (it is already the ownedString):The other
into_owned()calls in the tree operate onCow(to_string_lossy().into_owned())and are fine; only this
Stringcase is wrong.Verification
Since the function is
#[cfg(windows)], verified with a Windows cross-target type-check(
rustc --target x86_64-pc-windows-msvc --emit=metadataon the isolated function):|| raw.into_owned()→ reproduceserror[E0599];|| raw→ type-checks clean.cargo check -p codex-plus-coreon macOS stays green.