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

Fix build and update to syn v2 #518

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
.vscode/
.idea/
cobertura.xml
cargo-geiger/tests/snapshots/*.new
52 changes: 19 additions & 33 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-geiger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ maintenance = { status = "experimental" }
anyhow = "1.0.70"
cargo = "0.75.1"
cargo-geiger-serde = { path = "../cargo-geiger-serde", version = "0.2.3" }
cargo_metadata = "0.18.1"
cargo_metadata = "0.15.4"
cargo-platform = "0.1.2"
colored = "2.0.0"
console = "0.15.5"
Expand Down
4 changes: 2 additions & 2 deletions cargo-geiger/src/mapping/geiger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ mod geiger_tests {
}
),
case(
"git+https://github.com/rust-itertools/itertools.git?rev=8761fbefb3b209",
"git+https://github.com/rust-itertools/itertools.git?rev=98d3978",
CargoGeigerSerdeSource::Git {
url: Url::parse("https://github.com/rust-itertools/itertools.git").unwrap(),
rev: String::from("8761fbefb3b209")
rev: String::from("98d3978")
}
),
case(
Expand Down
4 changes: 4 additions & 0 deletions cargo-geiger/src/scan/rs_file/custom_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ pub struct CustomExecutor {

#[derive(Debug)]
enum CustomExecutorError {
#[allow(dead_code)]
InnerContextMutex(String),
#[allow(dead_code)]
Io(io::Error, PathBuf),
#[allow(dead_code)]
OutDirKeyMissing(String),
#[allow(dead_code)]
OutDirValueMissing(String),
}

Expand Down
4 changes: 2 additions & 2 deletions cargo-geiger/tests/external_package_reports/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ pub fn doc_comment_safety_report() -> SafetyReport {
pub fn itertools_package_id() -> PackageId {
PackageId {
name: "itertools".into(),
version: Version::new(0, 8, 0),
version: Version::new(0, 12, 1),
source: Source::Git {
url: Url::parse("https://github.com/rust-itertools/itertools.git")
.unwrap(),
rev: "8761fbefb3b209".into(),
rev: "98d3978".into(),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion cargo-geiger/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn test_package(name: &str) {
if !stderr.is_empty() {
let manifest_path_regex = regex::Regex::new(r"`([^`]+).toml`").unwrap();
let artifact_json_blob_regex =
regex::Regex::new(r#"\{"artifact":.*"emit":.*\}"#).unwrap();
regex::Regex::new(r#"\{"\$message_type":"artifact","artifact":.*"emit":.*\}"#).unwrap();

let stderr = manifest_path_regex.replace(&stderr, "`{MANIFEST_PATH}`");
let stderr = artifact_json_blob_regex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Functions Expressions Impls Traits Methods Dependency

0/0 1/1 0/0 0/0 0/0 ! test3_package_with_nested_deps 0.1.0
0/0 0/0 0/0 0/0 0/0 ? ├── doc-comment 0.3.1
0/0 0/72 0/3 0/1 0/3 ? ├── itertools 0.8.0
0/0 13/83 0/3 0/1 0/3 ! ├── itertools 0.12.1
0/0 0/0 0/0 0/0 0/0 ? │ └── either 1.5.2
1/1 4/4 0/0 0/0 0/0 ! └── test2_package_with_shallow_deps 0.1.0
0/0 2/2 0/0 0/0 0/0 ! ├── ref_slice 1.1.1
1/1 2/2 0/0 0/0 0/0 ! └── test1_package_with_no_deps 0.1.0

2/2 9/81 0/3 0/1 0/3
2/2 22/92 0/3 0/1 0/3


Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 :) ├── unicode-bidi 0.3.4
0/0 0/0 0/0 0/0 0/0 ? │ └── matches 0.1.8
0/0 20/20 0/0 0/0 0/0 ! └── unicode-normalization 0.1.8
2/2 354/354 4/4 1/1 13/13 ! └── smallvec 0.6.9
2/2 349/349 4/4 1/1 13/13 ! └── smallvec 0.6.9

2/2 375/375 4/4 1/1 13/13
2/2 370/370 4/4 1/1 13/13


Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Symbols:
Functions Expressions Impls Traits Methods Dependency

0/0 0/0 0/0 0/0 0/0 ? test9_package_with_git_deps 0.1.0
0/0 0/72 0/3 0/1 0/3 ? ├── itertools 0.8.0
0/0 14/14 0/0 0/0 0/0 ! │ └── either 1.9.0
0/0 13/83 0/3 0/1 0/3 ! ├── itertools 0.12.1
0/0 14/14 0/0 0/0 0/0 ! │ └── either 1.11.0
0/0 2/2 0/0 0/0 0/0 ! └── ref_slice 1.2.1

0/0 16/88 0/3 0/1 0/3
0/0 29/99 0/3 0/1 0/3


Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Functions Expressions Impls Traits Methods Dependency

0/0 1/1 0/0 0/0 0/0 ☢️ test3_package_with_nested_deps 0.1.0
0/0 0/0 0/0 0/0 0/0 ❓ ├── doc-comment 0.3.1
0/0 0/72 0/3 0/1 0/3 ├── itertools 0.8.0
0/0 13/83 0/3 0/1 0/3 ☢️ ├── itertools 0.12.1
0/0 0/0 0/0 0/0 0/0 ❓ │ └── either 1.5.2
1/1 4/4 0/0 0/0 0/0 ☢️ └── test2_package_with_shallow_deps 0.1.0
0/0 2/2 0/0 0/0 0/0 ☢️ ├── ref_slice 1.1.1
1/1 2/2 0/0 0/0 0/0 ☢️ └── test1_package_with_no_deps 0.1.0

2/2 9/81 0/3 0/1 0/3
2/2 22/92 0/3 0/1 0/3

```
## Second Section Header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 🔒 ├── unicode-bidi 0.3.4
0/0 0/0 0/0 0/0 0/0 ❓ │ └── matches 0.1.8
0/0 20/20 0/0 0/0 0/0 ☢️ └── unicode-normalization 0.1.8
2/2 354/354 4/4 1/1 13/13 ☢️ └── smallvec 0.6.9
2/2 349/349 4/4 1/1 13/13 ☢️ └── smallvec 0.6.9

2/2 375/375 4/4 1/1 13/13
2/2 370/370 4/4 1/1 13/13

```

2 changes: 1 addition & 1 deletion geiger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintenance = { status = "experimental" }

[dependencies]
cargo-geiger-serde = { path = "../cargo-geiger-serde", version = "0.2.3" }
syn = { version = "1.0.109", features = ["parsing", "printing", "clone-impls", "full", "extra-traits", "visit"] }
syn = { version = "^2.0.60", features = ["parsing", "printing", "clone-impls", "full", "extra-traits", "visit"] }
proc-macro2 = "1.0.78"

[dev-dependencies]
Expand Down
Loading
Loading