Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed May 19, 2024
1 parent 5d95852 commit 8735c68
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### next
- new `{context}` possible part for exported locations, originally designed for [bacon-ls](https://github.com/crisidev/bacon-ls) but available for other purposes - Thanks @crisidev

<a name="v2.17.0"></a>
### v2.17.0 - 2024/05/05
- default binding for 'c' in bacon.toml is now the new 'clippy-all' job which does what the old 'clippy' job was doing. 'clippy' job changed to not run on all targets. Default bacon.toml explain how to bind 'c' to clippy instead of 'clippy-all' - Fix #167
Expand Down
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "bacon"
version = "2.17.0"
version = "2.17.1-dev"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/bacon"
description = "background rust compiler"
Expand Down
1 change: 0 additions & 1 deletion src/export_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ pub struct ExportConfig {
pub enabled: Option<bool>,
pub path: Option<PathBuf>,
pub line_format: Option<String>,
pub add_context_to_message: Option<bool>
}
5 changes: 0 additions & 5 deletions src/export_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub struct ExportSettings {
pub enabled: bool,
pub path: PathBuf,
pub line_format: String,
pub add_context_to_message: bool
}

impl Default for ExportSettings {
Expand All @@ -18,7 +17,6 @@ impl Default for ExportSettings {
enabled: false,
path: default_path(),
line_format: default_line_format().to_string(),
add_context_to_message: false
}
}
}
Expand Down Expand Up @@ -47,8 +45,5 @@ impl ExportSettings {
if let Some(line_format) = &config.line_format {
self.line_format.clone_from(line_format);
}
if let Some(add_context_to_message) = config.add_context_to_message {
self.add_context_to_message = add_context_to_message;
}
}
}
18 changes: 8 additions & 10 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ use {
crate::*,
anyhow::Result,
lazy_regex::*,
std::{collections::HashSet, io, path::PathBuf},
std::{
collections::HashSet,
io,
path::PathBuf,
},
};

/// the usable content of cargo watch's output,
Expand Down Expand Up @@ -171,8 +175,7 @@ impl Report {
&self,
line: &Line,
) -> String {
self
.lines
self.lines
.iter()
.filter(|l| l.line_type == LineType::Normal && l.item_idx == line.item_idx)
.map(|l| l.content.to_raw())
Expand All @@ -188,11 +191,7 @@ impl Report {
) -> Result<(), io::Error> {
let mut last_kind = "???";
let mut message = None;
let format_has_context = mission
.settings
.export
.line_format
.contains("{context}");
let format_has_context = mission.settings.export.line_format.contains("{context}");
for line in &self.lines {
match line.line_type {
LineType::Title(Kind::Warning) => {
Expand Down Expand Up @@ -228,8 +227,7 @@ impl Report {
}
let extracted_context;
let context = if format_has_context {
extracted_context = self.
extract_raw_diagnostic_context(line);
extracted_context = self.extract_raw_diagnostic_context(line);
&extracted_context
} else {
""
Expand Down
6 changes: 4 additions & 2 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ impl Settings {
self.keybindings.add_all(keybindings);
}
if config.additional_alias_args.is_some() {
self.additional_alias_args.clone_from(&config.additional_alias_args);
self.additional_alias_args
.clone_from(&config.additional_alias_args);
}
for (name, job) in &config.jobs {
self.jobs.insert(name.clone(), job.clone());
Expand Down Expand Up @@ -140,7 +141,8 @@ impl Settings {
if args.features.is_some() {
self.features.clone_from(&args.features);
}
self.additional_job_args.clone_from(&args.additional_job_args);
self.additional_job_args
.clone_from(&args.additional_job_args);
}
pub fn check(&self) -> Result<()> {
if self.jobs.is_empty() {
Expand Down

0 comments on commit 8735c68

Please sign in to comment.