Skip to content

Improve error/warning handling for invalid package configs and build targets #7378

@Willaaaaaaa

Description

@Willaaaaaaa

Is your feature request related to a problem? Please describe.

add_rules("mode.debug", "mode.release")

add_requires("ncnn[bulabula]")

target("test")
    add_files("*.cpp")
    add_packages("ncnn")

run xmake will successfully build the target with no error and warning message. But bulabula is an invalid config for ncnn package description. Hopefully, when a config is wrongly added, something like a warning/error is given.

And the same checks are hoped to be added in relevant apis like add_requireconfs().

Describe the solution you'd like

print a warning or raise an error. And although this can be a language server feature, I think we'd better provide a more strict and detailed check info for users.

-- something like this:
wprint("package(xxx): a, b, c configs are ignored, plz check the package description to determine which config(s) you should use")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions