Skip to content

Dockerfile fails to build from clean checkout — missing client-retail/gui cargo features #2

Description

@claytonkimber

Summary

docker build . fails to compile from a clean checkout of master. The Dockerfile builds with cargo build --release --bin wow-sim --no-default-features --locked (no features), but master now requires a client-* feature and the gui feature to compile the always-built code. Result: 32 compile errors, no image.

Verified against master @ 30f59487c ("Fix retail and PTR startup Lua gaps").

Reproduction

git clone https://github.com/Osso/wow-ui-sim && cd wow-ui-sim
docker build -t wow-ui-sim .

Errors (representative)

error[E0425]: cannot find value `ACTIVE` in module `crate::client_profile`     (×many)
error[E0432]: unresolved import `valid_events::is_registerable_event`
error[E0433]: failed to resolve: could not find `hit_grid` in `super`
error: could not compile `wow-ui-sim` (lib) due to 32 previous errors

Root cause (two independent gaps)

  1. No client-* feature → ACTIVE undefined. src/client_profile.rs defines pub const ACTIVE six times, each behind #[cfg(feature = "client-<profile>")]. With --no-default-features and no client-* feature, ACTIVE is never defined. The valid_events::is_registerable_event re-export fails for the same reason.

  2. No gui feature → hit_grid missing, but it's referenced unconditionally. src/iced_app/frame_collect.rs:29 (inside the always-compiled pub mod frame_collect, explicitly commented "Always-compiled: no iced/GPU dependencies") has a field:

    pub hittable: Vec<(u64, super::hit_grid::HitOrderKey, crate::LayoutRect)>,

    but mod hit_grid at src/iced_app/mod.rs:30 is #[cfg(feature = "gui")]. Without gui, hit_grid doesn't exist → "could not find hit_grid in super".

Why CI doesn't catch it

.github/workflows/docker.yml only triggers on version tags (v* / [0-9]+.[0-9]+.[0-9]+) and workflow_dispatch — never on master pushes — and it builds with no --build-arg/features. The published :12.0.5 / :latest images were built from an older tag where the Dockerfile still compiled. The client-* feature split and the gui-gating of hit_grid later broke the committed Dockerfile on master, but since Docker CI never rebuilds on master, the breakage is invisible.

Meanwhile the project's own test.yml / release.yml build with sound,gui,client-retail, so they're unaffected.

Suggested fix

Match the build line to the repo's own CI. Minimal headless build (drops only sound; keeps gui, which is required because of the hit_grid reference above):

RUN cargo build --release --bin wow-sim --no-default-features \
        --features gui,client-retail --locked \
    && strip /build/target/release/wow-sim

Optionally also add a master-push trigger (or a build-only job) to docker.yml so a non-building Dockerfile can't regress silently again.

(Note: there's a follow-on issue — once gui is enabled, the screenshot command still can't run in the distroless runtime image because it has no Vulkan adapter. Filed separately.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions