Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve xtask on Windows #1632

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented May 28, 2024

lint-packages wasn't working on Windows because OUT_DIR was set to a UNC-path (Which causes problems like this one: dtolnay/rustversion#50 (comment)

While include!'s docs say:
The provided path is interpreted in a platform-specific way at compile time. So, for instance, an invocation with a Windows path containing backslashes \ would not compile correctly on Unix. (See https://doc.rust-lang.org/std/macro.include.html)

it often works with / on Windows because of https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry (File I/O functions in the Windows API convert "/" to "" as part of converting the name to an NT-style name, except when using the "\?" prefix)

While rustversion already fixed that, other crates didn't and running cargo xtask lint-packages didn't work on Windows. Even if the currently used crates would all be fixed, we might start using an unfixed one in future.

xtask/src/cargo.rs Outdated Show resolved Hide resolved
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Thanks!

@bjoernQ bjoernQ added the skip-changelog No changelog modification needed label May 28, 2024
Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@JurajSadel JurajSadel enabled auto-merge May 28, 2024 12:52
xtask/src/cargo.rs Outdated Show resolved Hide resolved
@JurajSadel JurajSadel disabled auto-merge May 28, 2024 12:54
@jessebraham jessebraham added this pull request to the merge queue May 28, 2024
Merged via the queue into esp-rs:main with commit 7c25750 May 28, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants