Skip to content

Does rust nightly require the lints.rust exceptions for system-deps dependencies? #98

@federicomenaquintero

Description

@federicomenaquintero

On rust nightly, librsvg is getting a lot of these:

error: unexpected `cfg` condition name: `system_deps_have_fontconfig`
   --> rsvg/src/test_utils/mod.rs:124:9
    |
124 |     not(system_deps_have_fontconfig),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(system_deps_have_fontconfig)'] }

And sure enough, per the help message and this note about automatic checking of cfgs, things work fine when I add those chunks to Cargo.toml.

That page also suggests printing some magic info from build.rs as an alternative (search for "build.rs example" in it). Is this something that system-deps could do itself?

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