bytecodealliance/registry

warg-server Args no-such-field without postgres feature

kriswuollett opened this issue · 2 comments

Visual Studio Code displays no such fieldrust-analyzer[no-such-field](https://rust-analyzer.github.io/manual.html#no-such-field) on the following when feature postgres is not included in analyzer settings:

#[derive(Parser, Debug)]

{
    // "rust-analyzer.cargo.features": ["postgres"],
}

CleanShot 2023-05-05 at 13 17 04@2x

The error goes away when the database_url and database_url_file fields are commented out:

/// The database connection URL if data-store is set to postgres.
///
/// Prefer using database-url-file, or environment variable variation,
/// to avoid exposing sensitive information.
#[cfg(feature = "postgres")]
#[arg(long, env = "DATABASE_URL")]
database_url: Option<String>,
/// The path to the operator key.
///
/// Takes precedence over database-url.
#[cfg(feature = "postgres")]
#[arg(long, env = "DATABASE_URL_FILE")]
database_url_file: Option<PathBuf>,

Perhaps another false positive like rust-lang/rust-analyzer#11473

Merged the workaround, so I think we can close this for now.