Skip to content

Commit

Permalink
Prep for 0.7.3 release.
Browse files Browse the repository at this point in the history
Updated `WatchSystem` to use debug formatting for errors to ensure that
full error chains are reported when running `trunk watch` & `trunk
serve`.
  • Loading branch information
thedodd committed Oct 16, 2020
1 parent 8f9bdbe commit fdef076
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ changelog
This changelog follows the patterns described here: https://keepachangelog.com/en/1.0.0/.

## Unreleased

## 0.7.3
### fixed
- Closed [#82](https://github.com/thedodd/trunk/issues/82): Remove the hardcoded Unix (`/`) path separator from the code and convert Windows NT UNC path to its simplified alternative before passing to `cargo metadata` command to prevent issues with Rust package collisions and writing `index.html` file.
- Updated the `WatchSystem` to use `{:?}` debug formatting for errors to ensure that full error chains are reported. This impacts the `watch` & `serve` subcommands. The `build` command was already behaving as needed.

## 0.7.2
### fixed
Expand Down
70 changes: 35 additions & 35 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
@@ -1,6 +1,6 @@
[package]
name = "trunk"
version = "0.7.2"
version = "0.7.3"
edition = "2018"
description = "Build, bundle & ship your Rust WASM application to the web."
license = "MIT/Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl HtmlPipeline {
let output_html = target_html.html(); // TODO: prettify this output.
fs::write(self.cfg.dist.join("index.html"), output_html.as_bytes())
.await
.context("error writing finalized HTML output")?; // TODO: show also error details (in a verbose mode?)
.context("error writing finalized HTML output")?;
Ok(())
}

Expand Down
3 changes: 2 additions & 1 deletion src/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ impl WatchSystem {
/// Run a build.
pub async fn build(&mut self) {
if let Err(err) = self.build.build().await {
self.progress.println(format!("{}", err));
// NOTE WELL: we use debug formatting here to ensure the error chain is displayed.
self.progress.println(format!("{:?}", err));
}
}

Expand Down

0 comments on commit fdef076

Please sign in to comment.