Skip to content

Commit

Permalink
refactor: update bpaf and remove workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos committed Jan 25, 2025
1 parent d93fbeb commit 5fd2f17
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ tests_macros = { path = "./crates/tests_macros" }

# Crates needed in the workspace
anyhow = "1.0.95"
bpaf = { version = "0.9.15", features = ["derive"] }
bpaf = { version = "0.9.16", features = ["derive"] }
camino = "1.1.9"
countme = "3.0.1"
crossbeam = "0.8.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_configuration/src/overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub struct OverrideLinterConfiguration {

/// List of rules
#[serde(skip_serializing_if = "Option::is_none")]
#[bpaf(pure(Rules::default()), hide)]
#[bpaf(pure(Default::default()), hide)]
pub rules: Option<Rules>,

/// List of rules
Expand Down
16 changes: 3 additions & 13 deletions crates/biome_service/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,19 +618,9 @@ impl IncludesFiles {
includes_files: Option<&[biome_glob::Glob]>,
) -> Self {
if let Some(includes_files) = includes_files {
// NOTE: when Bpaf deserialize this value, it returns `Some([])` as default value, even when
// there aren't any globs. This is a limitation/bug, which means that we need to treat
// `Some([])` as no globs provided.
if includes_files.is_empty() {
Self {
working_directory,
includes_files: None,
}
} else {
Self {
working_directory,
includes_files: Some(includes_files.to_vec().into_boxed_slice()),
}
Self {
working_directory,
includes_files: Some(includes_files.to_vec().into_boxed_slice()),
}
} else {
Self {
Expand Down

0 comments on commit 5fd2f17

Please sign in to comment.