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

[Issue] Can't compile #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[Issue] Can't compile #1

wants to merge 1 commit into from

Conversation

Bluscream
Copy link

@Bluscream Bluscream commented May 24, 2023

P:\Rust\dpmaster-rs>set RUSTDOCFLAGS="--crate-version hurz -Z unstable-options --enable-index-page"

results in

error: Unrecognized option: 'enable-index-page"'
P:\Rust\dpmaster-rs>set RUSTDOCFLAGS="--crate-version hurz -Z unstable-options"

results in

error: unknown unstable option: `unstable-options"`
P:\Rust\dpmaster-rs>set RUSTDOCFLAGS="--crate-version hurz -Z"

results in

error: unknown unstable option: `"`
P:\Rust\dpmaster-rs>set RUSTDOCFLAGS="--crate-version hurz"

results in

error: too many file operands

this is my build batch:

@REM set "cargo_bin=%USERPROFILE%\.cargo\bin"
@REM setx PATH "%PATH%;%cargo_bin%"

set RUSTDOCFLAGS="--crate-version hurz"
@REM -Z unstable-options --enable-index-page
"%USERPROFILE%\.cargo\bin\rustup" toolchain install nightly
"%USERPROFILE%\.cargo\bin\rustup" run nightly cargo doc --open --workspace --no-deps --all-features
@REM --locked

Here's the full output of your command:

P:\Rust\dpmaster-rs>build.bat

P:\Rust\dpmaster-rs>set RUSTDOCFLAGS="--crate-version hurz -Z unstable-options --enable-index-page"

P:\Rust\dpmaster-rs>"C:\Users\blusc\.cargo\bin\rustup" toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'

  nightly-x86_64-pc-windows-msvc unchanged - rustc 1.71.0-nightly (5ea3f0ae0 2023-05-23)

info: checking for self-update

P:\Rust\dpmaster-rs>"C:\Users\blusc\.cargo\bin\rustup" run nightly cargo doc --open --workspace --no-deps --all-features
   Compiling proc-macro2 v1.0.58
   Compiling quote v1.0.27
   Compiling windows_x86_64_msvc v0.48.0
   Compiling winapi v0.3.9
   Compiling log v0.4.17
   Compiling memchr v2.5.0
   Compiling futures-core v0.3.28
   Compiling windows_x86_64_msvc v0.42.2
   Compiling num-traits v0.2.15
   Compiling serde v1.0.163
   Compiling radium v0.5.3
   Compiling num-integer v0.1.45
   Compiling version_check v0.9.4
    Checking futures-sink v0.3.28
   Compiling lexical-core v0.7.6
    Checking windows-targets v0.48.0
    Checking windows-targets v0.42.2
    Checking windows-sys v0.48.0
    Checking windows-sys v0.45.0
   Compiling indexmap v1.9.3
   Compiling tokio v1.28.1
    Checking tap v1.0.1
    Checking static_assertions v1.1.0
    Checking arrayvec v0.5.2
    Checking funty v1.1.0
   Compiling serde_json v1.0.96
   Compiling io-lifetimes v1.0.11
   Compiling nom v6.1.2
    Checking lazy_static v1.4.0
    Checking wyz v0.2.0
   Compiling thiserror v1.0.40
    Checking regex-syntax v0.6.29
   Compiling syn v2.0.16
    Checking bitvec v0.19.6
   Compiling slab v0.4.8
   Compiling futures-channel v0.3.28
    Checking num_cpus v1.15.0
   Compiling futures-task v0.3.28
    Checking regex-syntax v0.7.2
    Checking hashbrown v0.12.3
    Checking itoa v1.0.6
    Checking sharded-slab v0.1.4
    Checking tracing-log v0.1.3
    Checking thread_local v1.1.7
    Checking mio v0.8.6
   Compiling cc v1.0.79
   Compiling futures-util v0.3.28
    Checking regex v1.8.2
    Checking smallvec v1.10.0
    Checking anstyle v1.0.0
   Compiling libc v0.2.144
    Checking utf8parse v0.2.1
    Checking cookie-factory v0.3.2
    Checking regex-automata v0.1.10
    Checking socket2 v0.4.9
    Checking chrono v0.4.24
    Checking ansi_term v0.12.1
    Checking anstyle-parse v0.2.0
   Compiling eyre v0.6.8
    Checking bytes v1.4.0
    Checking adler v1.0.2
    Checking gimli v0.27.2
    Checking futures-io v0.3.28
    Checking pin-utils v0.1.0
    Checking tracing-serde v0.1.3
    Checking colorchoice v1.0.0
    Checking matchers v0.0.1
    Checking miniz_oxide v0.6.2
    Checking object v0.30.3
    Checking anstyle-wincon v1.0.1
    Checking anstyle-query v1.0.0
    Checking rustc-demangle v0.1.23
    Checking is-terminal v0.4.7
    Checking owo-colors v1.3.0
    Checking clap_lex v0.5.0
   Compiling heck v0.4.1
    Checking anstream v0.3.2
    Checking indenter v0.3.3
    Checking strsim v0.10.0
    Checking clap_builder v4.3.0
   Compiling backtrace v0.3.67
    Checking addr2line v0.19.0
   Compiling thiserror-impl v1.0.40
   Compiling tracing-attributes v0.1.24
   Compiling tokio-macros v2.1.0
   Compiling futures-macro v0.3.28
   Compiling clap_derive v4.3.0
    Checking dpmaster-proto v0.1.0 (P:\Rust\dpmaster-rs\dpmaster-proto)
 Documenting dpmaster-proto v0.1.0 (P:\Rust\dpmaster-rs\dpmaster-proto)
    Checking tracing v0.1.37
error: Unrecognized option: 'enable-index-page"'

error: could not document `dpmaster-proto`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name dpmaster_proto dpmaster-proto\src\lib.rs -o P:\Rust\dpmaster-rs\target\doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=119 -C metadata=48695813195304f0 -L dependency=P:\Rust\dpmaster-rs\target\debug\deps --extern cookie_factory=P:\Rust\dpmaster-rs\target\debug\deps\libcookie_factory-b0eeebc97e8aa179.rmeta --extern indexmap=P:\Rust\dpmaster-rs\target\debug\deps\libindexmap-54f87bdb1f8b42d5.rmeta --extern memchr=P:\Rust\dpmaster-rs\target\debug\deps\libmemchr-c44c5598531f0c2f.rmeta --extern nom=P:\Rust\dpmaster-rs\target\debug\deps\libnom-b3253c44b52303be.rmeta --extern thiserror=P:\Rust\dpmaster-rs\target\debug\deps\libthiserror-9f15f243aa344a10.rmeta "\"--crate-version" hurz -Z unstable-options "--enable-index-page\"" --crate-version 0.1.0` (exit code: 1)
warning: build failed, waiting for other jobs to finish...

@robo9k
Copy link
Owner

robo9k commented May 25, 2023

Those flags only affect rustdoc output and aren't strictly needed. If you want to read rustdoc, it's available at https://robo9k.github.io/dpmaster-rs/ or you should be able to build it without any RUSTDOCFLAGS.
You'll notice there's not a whole lot of it anyways, except for some diagrams at https://robo9k.github.io/dpmaster-rs/dpmaster_proto/

As a whole there's not much finished in this project and it's very much experimental. The README should probably not even contain that shell block, it's more a reminder to myself to setup some optional functionality for the GitHub Pages rustdoc output.
What you could try instead is:

$ cargo run --package dpmaster-game-client-bin -- get-servers --master-server master.ioquake3.org:27950 --game-name Quake3Arena --protocol-number 68

This should give you output containing some Quake 3 servers with IPv4:port
Is there something specific you were looking for?

I didn't look further into why rustdoc is complaining about those flags in your case, but they still exist https://doc.rust-lang.org/rustdoc/unstable-features.html#--enable-index-page-generate-a-default-index-page-for-docs
Maybe you need to quote arguments differently? I'm not using Windows for development, so I can't help much.

Either way, thank your for your interest and reporting this issue :)

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