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

Build failure: windows-sys v0.52.0 with windows-targets 0.52.1 #2871

Closed
davidkna opened this issue Feb 22, 2024 · 1 comment
Closed

Build failure: windows-sys v0.52.0 with windows-targets 0.52.1 #2871

davidkna opened this issue Feb 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@davidkna
Copy link

davidkna commented Feb 22, 2024

Summary

After updating windows to v0.53.0 windows-sys v0.52.0 no longer builds. This seems to be a seperate issue from #2869.

error: no rules expected the token `#`
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-sys-0.52.0\src\Windows\Win32\NetworkManagement\IpHelper\mod.rs:6:50
   |
6  | ::windows_targets::link!("iphlpapi.dll" "system" #[doc = "Required features: `\"Win32_Foundation\"`"] fn CancelMibChangeNotify2(notificat...
   |                                                  ^ no rules expected this token in macro call``

Crate manifest

starship/starship#5789

[package]
name = "starship"
version = "1.17.1"
authors = ["Starship Contributors"]
build = "build.rs"
categories = ["command-line-utilities"]
documentation = "https://starship.rs/guide/"
edition = "2021"
homepage = "https://starship.rs"
# Keep `/` in front of `README.md` to exclude localized readmes
include = [
  "src/**/*",
  "/starship.exe.manifest",
  "media/icon.ico",
  "build.rs",
  "LICENSE",
  "/README.md",
  "docs/.vuepress/public/presets/toml/",
  ".github/config-schema.json",
]
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
license = "ISC"
readme = "README.md"
repository = "https://github.com/starship/starship"
# Note: MSRV is only intended as a hint, and only the latest version is officially supported in starship.
rust-version = "1.65"
description = """
The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️
"""

[features]
default = ["battery", "notify", "gix-max-perf"]
battery = ["starship-battery"]
config-schema = ["schemars"]
notify = ["notify-rust"]

# Enables most of the `max-performance` features of the `gix` module for better performance.
# This can be more difficult to build in some conditions and requires cmake.
gix-max-perf = ["gix-features/zlib-ng", "gix/fast-sha1"]
# Slower than `git-repository-max-perf`, but better than the default.
# Unlike `git-repository-max-perf` this does not require cmake and allows dynamic zlib linking.
gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"]

[dependencies]
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std", "wasmbind"] }
clap = { version = "4.5.1", features = ["derive", "cargo", "unicode"] }
clap_complete = "4.5.1"
dirs-next = "2.0.0"
dunce = "1.0.4"
gethostname = "0.4.3"
# default feature restriction addresses https://github.com/starship/starship/issues/4251
gix = { version = "0.58.0", default-features = false, features = ["max-performance-safe", "revision"] }
gix-features = { version = "0.38.0", optional = true }
indexmap = { version = "2.2.3", features = ["serde"] }
log = { version = "0.4.20", features = ["std"] }
# notify-rust is optional (on by default) because the crate doesn't currently build for darwin with nix
# see: https://github.com/NixOS/nixpkgs/issues/160876
notify-rust = { version = "4.10.0", optional = true }
nu-ansi-term = "0.50.0"
once_cell = "1.19.0"
open = "5.0.1"
# update os module config and tests when upgrading os_info
os_info = "3.7.0"
path-slash = "0.2.1"
pest = "2.7.7"
pest_derive = "2.7.7"
quick-xml = "0.31.0"
rand = "0.8.5"
rayon = "1.8.1"
regex = { version = "1.10.3", default-features = false, features = ["perf", "std", "unicode-perl"] }
rust-ini = "0.20.0"
semver = "1.0.22"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
sha1 = "0.10.6"
shadow-rs = { version = "0.26.1", default-features = false }
# battery is optional (on by default) because the crate doesn't currently build for Termux
# see: https://github.com/svartalf/rust-battery/issues/33
starship-battery = { version = "0.8.2", optional = true }
strsim = "0.10.1"
systemstat = "=0.2.3"
terminal_size = "0.3.0"
toml = { version = "0.8.10", features = ["preserve_order"] }
toml_edit = "0.22.6"
unicode-segmentation = "1.11.0"
unicode-width = "0.1.11"
urlencoding = "2.1.3"
versions = "6.1.0"
which = "6.0.0"
yaml-rust = "0.4.5"

process_control = { version = "4.1.0", features = ["crossbeam-channel"] }

guess_host_triple = "0.1.3"
home = "0.5.9"
shell-words = "1.1.0"

[dependencies.schemars]
version = "0.8.16"
optional = true
features = ["preserve_order", "indexmap2"]

[target.'cfg(windows)'.dependencies]
deelevate = "0.2.0"

[target.'cfg(windows)'.dependencies.windows]
version = "0.53.0"
features = [
  "Win32_Foundation",
  "Win32_UI_Shell",
  "Win32_Security",
  "Win32_System_Threading",
  "Win32_Storage_FileSystem",
]

[target.'cfg(not(windows))'.dependencies]
nix = { version = "0.27.1", default-features = false, features = ["feature", "fs", "user"] }

[build-dependencies]
shadow-rs = { version = "0.26.1", default-features = false }
dunce = "1.0.4"

[target.'cfg(windows)'.build-dependencies]
winres = "0.1.12"

[dev-dependencies]
mockall = "0.12"
tempfile = "3.10.0"

[profile.release]
codegen-units = 1
lto = true
strip = true

[[bin]]
name = "starship"
path = "src/main.rs"

Crate code

No response

@davidkna davidkna added the bug Something isn't working label Feb 22, 2024
@davidkna
Copy link
Author

Looks like this was fixed in #2868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant