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

0.48.4 #2613

Merged
merged 1 commit into from
Aug 18, 2023
Merged

0.48.4 #2613

merged 1 commit into from
Aug 18, 2023

Conversation

kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Aug 17, 2023

A user reported issues with using Rust 1.48 with windows-targets. It is quite difficult to validate as that is such an old version of Rust, but this tweak should address the compatibility concern.

This just flips windows-targets and the arch-specific crates to use Rust edition 2018.

Copy link

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

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

Thanks for this @kennykerr

@kennykerr
Copy link
Collaborator Author

Thanks for checking folks.

@kennykerr kennykerr merged commit cdb90d8 into master Aug 18, 2023
@kennykerr kennykerr deleted the 0.48.4 branch August 18, 2023 13:24
@kennykerr
Copy link
Collaborator Author

I have published 0.48.4 of windows-targets but even now I'm not convinced this actually works. Rust 1.48 is really broken.

When I set rustup default 1.48 and then build an empty project with a dependency on windows-targets it complains about the resolver. 🤷‍♂️

@Darksonn
Copy link

The Cargo.toml that it's using looks like this:

# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2018"
name = "windows-targets"
version = "0.48.4"
authors = ["Microsoft"]
description = "Import libs for Windows"
readme = "readme.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/microsoft/windows-rs"
resolver = "2"

[target.aarch64-pc-windows-gnullvm.dependencies.windows_aarch64_gnullvm]
version = "0.48.4"

[target."cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))".dependencies.windows_aarch64_msvc]
version = "0.48.4"

[target."cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(windows_raw_dylib)))".dependencies.windows_i686_gnu]
version = "0.48.4"

[target."cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))".dependencies.windows_i686_msvc]
version = "0.48.4"

[target."cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))".dependencies.windows_x86_64_gnu]
version = "0.48.4"

[target."cfg(all(target_arch = \"x86_64\", target_env = \"msvc\", not(windows_raw_dylib)))".dependencies.windows_x86_64_msvc]
version = "0.48.4"

[target.x86_64-pc-windows-gnullvm.dependencies.windows_x86_64_gnullvm]
version = "0.48.4"

The resolver = 2 line is the problem. If the original toml doesn't have it, then you may have to use an older cargo to publish it.

@kennykerr
Copy link
Collaborator Author

Thanks, there's no resolver in the original toml but there is one in the workspace for windows-rs. Older versions of cargo just don't work well or at all within the context of a workspace.

@Darksonn
Copy link

Yeah, 1.48 CI also caused us a lot of trouble.

@kennykerr
Copy link
Collaborator Author

I can fix the 1.48 resolver thing by temporarily deleting the workspace file, publishing, and then restoring it.

I think I'll do that and publish windows-targets 0.48.5 and that will be the final release to support 1.48.

I will then switch everything in windows-rs to use edition 2021 and MSRV 1.56.

@Darksonn
Copy link

Sounds like a good plan to me.

@kennykerr kennykerr mentioned this pull request Aug 18, 2023
@kennykerr
Copy link
Collaborator Author

All done. windows-targets 0.48.5 has been published and I've manually confirmed that it builds fine with Rust 1.48.

@Thomasdezeeuw
Copy link

Thanks @kennykerr!

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.

3 participants