Skip to content

Commit 246d769

Browse files
authored
Merge pull request #19821 from github/redsun82/backport-lock-fixes
Rust: backport `Cargo.lock` fixes for CI
2 parents 6b280ef + 3be4173 commit 246d769

File tree

43 files changed

+11153
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+11153
-13
lines changed

rust/extractor/src/qltest.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use glob::glob;
44
use itertools::Itertools;
55
use std::ffi::OsStr;
66
use std::fs;
7-
use std::path::Path;
87
use std::process::Command;
98
use tracing::info;
109

@@ -60,18 +59,9 @@ fn set_sources(config: &mut Config) -> anyhow::Result<()> {
6059
Ok(())
6160
}
6261

63-
fn remove_file_if_exists(path: &Path) -> anyhow::Result<()> {
64-
match fs::remove_file(path) {
65-
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
66-
x => x,
67-
}
68-
.context(format!("removing file {}", path.display()))
69-
}
70-
7162
pub(crate) fn prepare(config: &mut Config) -> anyhow::Result<()> {
7263
dump_lib()?;
7364
set_sources(config)?;
74-
remove_file_if_exists(Path::new("Cargo.lock"))?;
7565
dump_cargo_manifest(&config.qltest_dependencies)?;
7666
if config.qltest_cargo_check {
7767
let status = Command::new("cargo")

rust/ql/test/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
Cargo.toml
2-
Cargo.lock
32
lib.rs
43
target/

rust/ql/test/extractor-tests/File/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/canonical_path/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/canonical_path_disabled/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/crate_graph/Cargo.lock

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/crate_graph/crates.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#-----| core -> Crate([email protected])
1919
#-----| compiler_builtins -> Crate([email protected])
2020

21-
#-----| Crate([email protected].0)
21+
#-----| Crate([email protected].1)
2222
#-----| proc_macro -> Crate([email protected])
2323
#-----| alloc -> Crate([email protected])
2424
#-----| core -> Crate([email protected])
@@ -89,7 +89,7 @@ main.rs:
8989
#-----| core -> Crate([email protected])
9090
#-----| std -> Crate([email protected])
9191
#-----| test -> Crate([email protected])
92-
#-----| cfg_if -> Crate([email protected].0)
92+
#-----| cfg_if -> Crate([email protected].1)
9393
#-----| digest -> Crate([email protected])
9494

9595
#-----| Crate([email protected])

rust/ql/test/extractor-tests/literal/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/macro_expansion/Cargo.lock

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/test/extractor-tests/utf8/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)