How to disable a compiler error in a similar fashion to a warning?

Hi there, this might seem like a bit of a weird question, but hang in there. I am using cargo-apk (For android) and after looking at it, I can add the following to use the internal injected ffi and glue:

extern crate cargo_apk_injected_glue;

because of the name of the crate that is specified here, however vscode (Understandably) gets mad at me. I have set the target to check to the appropriate toolchain and target triple, but this is pretty specific to the compilation process of cargo-apk, and I’m not sure if I can fix this in a config file. Anyway, I was wondering if there was any way to #![] my way out of this. Just to ignore the errors in this one file, which I know will work, its just that the cargo check that vscode runs doesn’t.

This is mainly because of the fact that the entire checking process (and compile process) just stops when a mod, or extern crate isn’t found, therefore completely nulling the useful things that the vscode rust extension can do with the rust language server.

cargo check does have an --exclude option:

$ cargo help check
        [...]
        --exclude <SPEC>...         Exclude packages from the check

Could you configure vscode to run cargo check with that option for cargo_apk_injected_glue?

Ah, I’ll try that, not too sure about vscode’s rls configuration capabilities though

does it work if you do it on the cli?

Well, I tried it on the cli, and found that no, it doesn’t work, but I just found out that the checker doesn’t stop when it doesn’t find a crate :confused: I guess my instance of vscode yesterday was acting weird… Oh well