Skip to content

Fix plotly_static Default Compilation Error #400

@RedZapdos123

Description

@RedZapdos123

When checking out the plotly.rs repository fresh and running cargo check or cargo build at the workspace root, the build fails immediately. The compilation fails on the build script of the newly introduced plotly_static crate with the following error:

error: At least one of 'geckodriver' or 'chromedriver' features must be enabled.
  --> plotly_static/build.rs:17:1
   |
17 | ...enabled.");
   | ...^^^^^^^^^^

This occurs because plotly_static is a workspace member and is also listed as a dev-dependency of plotly. During a standard workspace check or test run, plotly_static is compiled without features because it does not define any default features in its Cargo.toml.

Minimal Reproducible Example (MRE):

  1. Clone the plotly.rs repository fresh:
    git clone https://github.com/plotly/plotly.rs.git
    cd plotly.rs
  2. Run a bare cargo check in the repository root:
    cargo check
  3. The build fails on plotly_static's build script compilation.

Expected Behavior:

A bare cargo check or cargo build in the repository root should compile cleanly out of the box without requiring manual feature flags.

Current Behavior:

The build script of plotly_static raises a hard compile_error! when no driver features are enabled, blocking all bare workspace builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions