Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version #869

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.4.3

- [#858](https://github.com/trailofbits/dylint/pull/858) made `curl-sys` a non-optional dependency of the `dylint` package. This had unintended side effects, e.g., causing all of the example lints to transitively depend on `curl-sys`. [#867](https://github.com/trailofbits/dylint/pull/867) corrects the situation. ([#867](https://github.com/trailofbits/dylint/pull/867))
- Ensure that consecutive uses of `--lib` produce the correct output, i.e., are not improperly cached ([#866](https://github.com/trailofbits/dylint/pull/866))—thanks [@EFanZh](https://github.com/EFanZh) for the [bug report](https://github.com/trailofbits/dylint/issues/856)

## 2.4.2

- Work around [curl/curl#11893](https://github.com/curl/curl/issues/11893) ([#858](https://github.com/trailofbits/dylint/pull/858))
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions cargo-dylint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-dylint"
version = "2.4.2"
version = "2.4.3"
authors = ["Samuel E. Moelius III <[email protected]>"]
description = "A tool for running Rust lints from dynamic libraries"
edition = "2021"
Expand All @@ -13,8 +13,8 @@ anyhow = { version = "1.0", features = ["backtrace"] }
clap = { version = "4.4", features = ["cargo", "derive", "wrap_help"] }
env_logger = "0.10"

dylint = { version = "=2.4.2", path = "../dylint", features = ["package_options"] }
dylint_internal = { version = "=2.4.2", path = "../internal" }
dylint = { version = "=2.4.3", path = "../dylint", features = ["package_options"] }
dylint_internal = { version = "=2.4.3", path = "../internal" }

[dev-dependencies]
assert_cmd = "2.0"
Expand All @@ -32,4 +32,4 @@ similar-asserts = "1.5"
tempfile = "3.8"
walkdir = "2.4"

dylint_internal = { version = "=2.4.2", path = "../internal", features = ["testing"] }
dylint_internal = { version = "=2.4.3", path = "../internal", features = ["testing"] }
16 changes: 16 additions & 0 deletions cargo-dylint/fixtures/depinfo_dylint_libs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "depinfo_dylint_libs"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
anyhow = "1.0"

[workspace]

[workspace.metadata.dylint]
libraries = [
{ path = "../../../examples/restriction/question_mark_in_expression" },
{ path = "../../../examples/restriction/try_io_result" },
]
10 changes: 10 additions & 0 deletions cargo-dylint/fixtures/depinfo_dylint_libs/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use anyhow::Result;
use std::{
io::{stdout, Write},
str::from_utf8,
};

fn main() -> Result<()> {
write!(stdout(), "{}", from_utf8(b"Hello, world!")?)?;
Ok(())
}
31 changes: 31 additions & 0 deletions cargo-dylint/tests/depinfo_dylint_libs.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use assert_cmd::prelude::*;
use dylint_internal::env;
use predicates::prelude::*;
use std::{env::set_var, process::Command};

#[ctor::ctor]
fn initialize() {
set_var(env::CARGO_TERM_COLOR, "never");
}

#[test]
fn depinfo_dylint_libs() {
Command::cargo_bin("cargo-dylint")
.unwrap()
.current_dir("fixtures/depinfo_dylint_libs")
.args(["dylint", "--lib", "question_mark_in_expression"])
.assert()
.stderr(predicate::str::contains(
"\nwarning: using the `?` operator within an expression\n",
));

Command::cargo_bin("cargo-dylint")
.unwrap()
.current_dir("fixtures/depinfo_dylint_libs")
.args(["dylint", "--lib", "try_io_result"])
.assert()
.stderr(predicate::str::contains(
"\nwarning: returning a `std::io::Result` could discard relevant context (e.g., files \
or paths involved)\n",
));
}
4 changes: 2 additions & 2 deletions driver/Cargo.lock

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

4 changes: 2 additions & 2 deletions driver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dylint_driver"
version = "2.4.2"
version = "2.4.3"
authors = ["Samuel E. Moelius III <[email protected]>"]
description = "Dylint driver library"
edition = "2021"
Expand All @@ -15,7 +15,7 @@ log = "0.4"
rustversion = "1.0"
serde_json = "1.0"

dylint_internal = { version = "=2.4.2", path = "../internal", features = ["rustup"] }
dylint_internal = { version = "=2.4.3", path = "../internal", features = ["rustup"] }

[workspace]

Expand Down
5 changes: 5 additions & 0 deletions driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,17 @@ impl rustc_driver::Callbacks for Callbacks {
previous(sess, lint_store);
}

let dylint_libs = env::var(env::DYLINT_LIBS).ok();
let dylint_metadata = env::var(env::DYLINT_METADATA).ok();
let dylint_no_deps = env::var(env::DYLINT_NO_DEPS).ok();
let dylint_no_deps_enabled =
dylint_no_deps.as_ref().map_or(false, |value| value != "0");
let cargo_primary_package_is_set = env::var(env::CARGO_PRIMARY_PACKAGE).is_ok();

sess.parse_sess.env_depinfo.lock().insert((
rustc_span::Symbol::intern(env::DYLINT_LIBS),
dylint_libs.as_deref().map(rustc_span::Symbol::intern),
));
sess.parse_sess.env_depinfo.lock().insert((
rustc_span::Symbol::intern(env::DYLINT_METADATA),
dylint_metadata.as_deref().map(rustc_span::Symbol::intern),
Expand Down
8 changes: 4 additions & 4 deletions dylint-link/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dylint-link"
version = "2.4.2"
version = "2.4.3"
authors = ["Samuel E. Moelius III <[email protected]>"]
description = "A wrapper around Rust's default linker to help create Dyling libraries"
edition = "2021"
Expand All @@ -13,17 +13,17 @@ env_logger = "0.10"
if_chain = "1.0"
toml_edit = "0.20"

dylint_internal = { version = "=2.4.2", path = "../internal", features = ["cargo"] }
dylint_internal = { version = "=2.4.3", path = "../internal", features = ["cargo"] }

[build-dependencies]
dylint_internal = { version = "=2.4.2", path = "../internal" }
dylint_internal = { version = "=2.4.3", path = "../internal" }

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
tempfile = "3.8"

dylint_internal = { version = "=2.4.2", path = "../internal", features = ["packaging"] }
dylint_internal = { version = "=2.4.3", path = "../internal", features = ["packaging"] }

[target.'cfg(target_os = "windows")'.dependencies]
cc = "1.0"
8 changes: 4 additions & 4 deletions dylint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dylint"
version = "2.4.2"
version = "2.4.3"
authors = ["Samuel E. Moelius III <[email protected]>"]
description = "A tool for running Rust lints from dynamic libraries"
edition = "2021"
Expand Down Expand Up @@ -36,22 +36,22 @@ curl-sys = { version = "0.4", features = [
"force-system-lib-on-osx",
], optional = true }

dylint_internal = { version = "=2.4.2", path = "../internal", features = [
dylint_internal = { version = "=2.4.3", path = "../internal", features = [
"git",
"packaging",
"rustup",
"sed",
] }

[build-dependencies]
dylint_internal = { version = "=2.4.2", path = "../internal", features = [
dylint_internal = { version = "=2.4.3", path = "../internal", features = [
"cargo",
] }

[dev-dependencies]
env_logger = "0.10"

dylint_internal = { version = "=2.4.2", path = "../internal", features = [
dylint_internal = { version = "=2.4.3", path = "../internal", features = [
"examples",
] }

Expand Down
4 changes: 2 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "examples"
version = "2.4.2"
version = "2.4.3"
description = "A dummy package for testing the example Dylint libraries"
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -12,4 +12,4 @@ cargo_metadata = "0.18"
toml_edit = "0.20"
walkdir = "2.4"

dylint_internal = { version = "=2.4.2", path = "../internal", features = ["clippy_utils", "examples"] }
dylint_internal = { version = "=2.4.3", path = "../internal", features = ["clippy_utils", "examples"] }
22 changes: 11 additions & 11 deletions examples/general/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 examples/general/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "general"
version = "2.4.2"
version = "2.4.3"
authors = ["Samuel E. Moelius III <[email protected]>"]
description = "General-purpose lints"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion examples/general/await_holding_span_guard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "await_holding_span_guard"
version = "2.4.2"
version = "2.4.3"
authors = ["David Barsky"]
description = "A lint to check for Span guards held while calling await inside an async function"
edition = "2021"
Expand Down
Loading