Skip to content

Commit

Permalink
Merge pull request #41 from epage/update
Browse files Browse the repository at this point in the history
chore: Pass along improvements
  • Loading branch information
epage committed Jan 31, 2021
2 parents 5540e97 + e3c1721 commit debb804
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 126 deletions.
40 changes: 20 additions & 20 deletions CHANGELOG.md
@@ -1,6 +1,13 @@
<a name="0.5.0"></a>
## 0.5.0 (2019-04-08)
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

<!-- next-header -->
## [Unreleased] - ReleaseDate

## [0.5.0] - 2019-04-08

#### Features

Expand All @@ -15,11 +22,7 @@

* Gracefully handle upcoming cargo features ([a00f2408](https://github.com/crate-ci/escargot/commit/a00f240831ddc71b1846005df4917111e3690a82))



<a name="0.4.0"></a>
## 0.4.0 (2018-12-31)

## [0.4.0] - 2018-12-31

#### Features

Expand All @@ -41,21 +44,13 @@
* Stream messages ([343027d4](https://github.com/crate-ci/escargot/commit/343027d40cdeb94b820ecb0a8fbb145fcf3f19c7), breaks [#](https://github.com/crate-ci/escargot/issues/))
* MessageItr -> MessageIter ([07c4b257](https://github.com/crate-ci/escargot/commit/07c4b25740898b75af7b5d291be04ac737c5cd6c), closes [#9](https://github.com/crate-ci/escargot/issues/9), breaks [#](https://github.com/crate-ci/escargot/issues/))



<a name="0.3.1"></a>
## 0.3.1 (2018-08-07)

## [0.3.1] - 2018-08-07

#### Bug Fixes

* **run:** Example support ([99029550](https://github.com/crate-ci/escargot/commit/990295504ebd195f330e7b3e19b01e86a7b401f7), closes [#7](https://github.com/crate-ci/escargot/issues/7))



<a name="0.3.0"></a>
## 0.3.0 (2018-08-05)

## [0.3.0] - 2018-08-05

#### Features

Expand All @@ -66,10 +61,15 @@
* `current_target` spelling is corrected ([df4607a8](https://github.com/crate-ci/escargot/commit/df4607a8170a27d746e7c259e05c478a02d570e5))
* Removed parts of `CargoError` ([df4607a8](https://github.com/crate-ci/escargot/commit/df4607a8170a27d746e7c259e05c478a02d570e5))

<a name="0.2.0"></a>
## 0.2.0 (2018-06-27)

## [0.2.0] - 2018-06-27

#### Breaking Changes

* Define concrete CargoError ([445cb391](https://github.com/crate-ci/escargot/commit/445cb39156b63ce1894d40b31805273d995e185c), breaks [#](https://github.com/crate-ci/escargot/issues/))

<!-- next-url -->
[Unreleased]: https://github.com/assert-rs/predicates-rs/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/assert-rs/predicates-rs/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/assert-rs/predicates-rs/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/assert-rs/predicates-rs/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/assert-rs/predicates-rs/compare/v0.2.0...v0.3.0
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -15,6 +15,7 @@ edition = "2018"
[badges]
azure-devops = { project = "crate-ci", pipeline = "escargot" }
codecov = { repository = "crate-ci/escargot" }
maintenance = { status = "passively-maintained" }

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand Down
189 changes: 168 additions & 21 deletions azure-pipelines.yml
@@ -1,31 +1,178 @@
trigger:
branches:
include: ['master']
tags:
include: ['v*']
pr:
branches:
include:
- master
paths:
exclude:
- "*.md"
- "docs/*"
- "LICENSE-*"
schedules:
- cron: "5 5 5 * *"
displayName: Monthly Build
branches:
include:
- master
variables:
minrust: 1.44.0
codecov_token: $(CODECOV_TOKEN_SECRET)
windows_vm: vs2017-win2016
mac_vm: macos-10.14
linux_vm: ubuntu-16.04

jobs:
- template: default.yml@templates
parameters:
minrust: 1.36.0
codecov_token: $(CODECOV_TOKEN_SECRET)
- job: "Committed"
displayName: Lint History
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
- template: v1/azdo-step.yml@gh-install
parameters:
git: crate-ci/committed
target: 'x86_64-unknown-linux-gnu'
to: $(Build.StagingDirectory)/tools
- script: |
echo "This project uses Conventional style, see https://www.conventionalcommits.org"
$(Build.StagingDirectory)/tools/committed HEAD~..HEAD^2 --no-merge-commit -vv
displayName: Committed
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
stages:
- stage: check
displayName: Compilation Check
jobs:
- job: cargo_check
displayName: cargo check
pool:
vmImage: ${{ variables.linux_vm }}
steps:
- template: install-rust.yml@templates
parameters:
rust: stable
- script: cargo check --workspace --all-targets
displayName: Default features
- script: cargo check --workspace --all-targets --no-default-features
displayName: No-default features
- script: cargo check --workspace --all-targets --all-features
displayName: All features
- stage: test
displayName: Test
jobs:
- job: test
displayName: Test
strategy:
matrix:
windows:
imageName: ${{ variables.windows_vm }}
target: 'x86_64-pc-windows-msvc'
channel: stable
mac:
imageName: ${{ variables.mac_vm }}
target: 'x86_64-apple-darwin'
channel: stable
linux:
imageName: ${{ variables.linux_vm }}
target: 'x86_64-unknown-linux-gnu'
channel: stable
# Check for upcoming platform-specific compiler breakages
windows_beta:
imageName: ${{ variables.windows_vm }}
target: 'x86_64-pc-windows-msvc'
channel: beta
mac_beta:
imageName: ${{ variables.mac_vm }}
target: 'x86_64-apple-darwin'
channel: beta
linux_beta:
imageName: ${{ variables.linux_vm }}
target: 'x86_64-unknown-linux-gnu'
channel: beta
# Check for compiler breakages
linux_nightly:
imageName: ${{ variables.linux_vm }}
target: 'x86_64-unknown-linux-gnu'
channel: nightly
continueOnError: $[ne(variables.rust, 'stable')]
pool:
vmImage: $(imageName)
steps:
- template: install-rust.yml@templates
parameters:
rust: $(channel)
targets: ["$(TARGET)"]
- script: cargo test --target $(TARGET) --workspace
displayName: cargo test
- script: cargo doc --target $(TARGET) --workspace --no-deps
displayName: cargo doc
- job: msrv
displayName: "${{ format('Minimum supported Rust version: {0}', variables.minrust) }}"
dependsOn: []
pool:
vmImage: ${{ variables.linux_vm }}
steps:
- template: install-rust.yml@templates
parameters:
rust: ${{ variables.minrust }}
- script: cargo check --all --bins --examples --tests
displayName: cargo check
- stage: style
displayName: Style checks
dependsOn: []
jobs:
- job: "Committed"
displayName: Linting commit history
pool:
vmImage: ${{ variables.linux_vm }}
steps:
- checkout: self
- template: v1/azdo-step.yml@gh-install
parameters:
git: crate-ci/committed
target: 'x86_64-unknown-linux-gnu'
to: $(Build.StagingDirectory)/tools
- script: |
echo "Linting commits:"
git log --graph --oneline HEAD~..HEAD^2
echo "Against 'committed.toml':"
$(Build.StagingDirectory)/tools/committed --dump-config -
echo ""
echo "If this fails, don't sweat it. We're trying to encourage clear communication and not hinder contributions."
echo "If it is a reasonable issue and you lack time or feel uncomfortable fixing it yourself,"
echo "let us know and we can mentor or fix it."
$(Build.StagingDirectory)/tools/committed HEAD~..HEAD^2 --no-merge-commit -vv
displayName: Lint commit history
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
- job: style
displayName: Style checking
pool:
vmImage: ${{ variables.linux_vm }}
steps:
- template: install-rust.yml@templates
parameters:
rust: stable
components:
- rustfmt
- script: cargo fmt --all -- --check
displayName: rustfmt
- job: lint
displayName: Linting
strategy:
matrix:
current:
channel: ${{ variables.minrust }}
next:
channel: stable
continueOnError: $[eq(variables.channel, 'stable')]
pool:
vmImage: ${{ variables.linux_vm }}
steps:
- template: install-rust.yml@templates
parameters:
rust: $(channel)
components:
- clippy
- script: cargo check --workspace --all-targets --all-features
displayName: Warnings
env:
RUSTFLAGS: "-D warnings"
- script: cargo clippy --workspace --all-features --all-targets -- -D warnings
displayName: clippy
- ${{ if ne('', variables.codecov_token) }}:
- stage: coverage
displayName: Code coverage
dependsOn: test
jobs:
- template: coverage.yml@templates
parameters:
token: ${{ variables.codecov_token }}

resources:
repositories:
Expand Down
4 changes: 3 additions & 1 deletion committed.toml
@@ -1 +1,3 @@
style="Conventional"
style="conventional"
ignore_author_re="dependabot"
merge_commit = false
1 change: 0 additions & 1 deletion src/build.rs
Expand Up @@ -53,7 +53,6 @@ impl CargoBuild {
/// .unwrap();
/// ```
///
/// [`Cargo`]: struct.Cargo.html
pub fn new() -> Self {
Cargo::new().build()
}
Expand Down
21 changes: 5 additions & 16 deletions src/format/diagnostic.rs
Expand Up @@ -9,21 +9,20 @@ type CowStr<'a> = borrow::Cow<'a, str>;
/// The error code associated to this diagnostic.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct DiagnosticCode<'a> {
/// The code itself.
#[serde(borrow)]
pub code: CowStr<'a>,
/// An explanation for the code
#[serde(borrow)]
pub explanation: Option<CowStr<'a>>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}

/// A line of code associated with the Diagnostic
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct DiagnosticSpanLine<'a> {
/// The line of code associated with the error
#[serde(borrow)]
Expand All @@ -32,14 +31,12 @@ pub struct DiagnosticSpanLine<'a> {
pub highlight_start: usize,
/// End of the section of the line to highlight. 1-based, character offset in self.text
pub highlight_end: usize,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}

/// Macro expansion information associated with a diagnostic.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct DiagnosticSpanMacroExpansion<'a> {
/// span where macro was applied to generate this code; note that
/// this may itself derive from a macro (if
Expand All @@ -54,15 +51,12 @@ pub struct DiagnosticSpanMacroExpansion<'a> {
/// span where macro was defined (if known)
#[serde(borrow)]
pub def_site_span: Option<DiagnosticSpan<'a>>,

#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}

/// A section of the source code associated with a Diagnostic
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct DiagnosticSpan<'a> {
/// The file name this diagnostic comes from.
#[serde(borrow)]
Expand Down Expand Up @@ -97,9 +91,6 @@ pub struct DiagnosticSpan<'a> {
/// Macro invocations that created the code at this span, if any.
#[serde(borrow)]
pub expansion: Option<Box<DiagnosticSpanMacroExpansion<'a>>>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}

/// Whether a suggestion can be safely applied.
Expand All @@ -124,6 +115,7 @@ pub enum Applicability {
/// A diagnostic message generated by rustc
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct Diagnostic<'a> {
/// The error message of this diagnostic.
#[serde(borrow)]
Expand All @@ -142,9 +134,6 @@ pub struct Diagnostic<'a> {
/// The message as rustc would render it
#[serde(borrow)]
pub rendered: Option<CowStr<'a>>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}

/// The diagnostic level
Expand Down

0 comments on commit debb804

Please sign in to comment.