-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
fix(cargo): Treat projects outside the analyer root as packages
E.g. when analyzing a single Cargo project in a sub-directory with a `cargo.toml` file that points to "path dependencies" in a parent directory, these dependencies should not be seen as projects but as packages. This restores the behavior from before 7522a0c. As a bonus, this also resolves some inconsistencies compared to the original implementation: - Non-processed project VCS are not empty anymore. - "Out of tree" projects that are seen as packages now have the correct linkage and are also listed as packages (they were not listed as projects before although being referred to with `PROJECT_STATIC`). Resolves #8571. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent
60b00f6
commit c41c4c4
Showing
5 changed files
with
60 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,10 @@ project: | |
declared_licenses: [] | ||
declared_licenses_processed: {} | ||
vcs: | ||
type: "" | ||
url: "" | ||
revision: "" | ||
path: "" | ||
type: "Git" | ||
url: "<REPLACE_URL_PROCESSED>" | ||
revision: "<REPLACE_REVISION>" | ||
path: "<REPLACE_PATH>" | ||
vcs_processed: | ||
type: "Git" | ||
url: "<REPLACE_URL_PROCESSED>" | ||
|
@@ -21,7 +21,7 @@ project: | |
- name: "dependencies" | ||
dependencies: | ||
- id: "Crate::lib:0.1.0" | ||
linkage: "PROJECT_STATIC" | ||
linkage: "STATIC" | ||
dependencies: | ||
- id: "Crate::cfg-if:0.1.9" | ||
linkage: "STATIC" | ||
|
@@ -59,3 +59,32 @@ packages: | |
url: "https://github.com/alexcrichton/cfg-if.git" | ||
revision: "" | ||
path: "" | ||
- id: "Crate::lib:0.1.0" | ||
purl: "pkg:cargo/[email protected]" | ||
declared_licenses: | ||
- "Apache-2.0" | ||
- "MIT" | ||
declared_licenses_processed: | ||
spdx_expression: "Apache-2.0 OR MIT" | ||
description: "" | ||
homepage_url: "https://example.org" | ||
binary_artifact: | ||
url: "" | ||
hash: | ||
value: "" | ||
algorithm: "" | ||
source_artifact: | ||
url: "" | ||
hash: | ||
value: "" | ||
algorithm: "" | ||
vcs: | ||
type: "Git" | ||
url: "<REPLACE_URL_PROCESSED>" | ||
revision: "<REPLACE_REVISION>" | ||
path: "plugins/package-managers/cargo/src/funTest/assets/projects/synthetic/cargo-subcrate" | ||
vcs_processed: | ||
type: "Git" | ||
url: "<REPLACE_URL_PROCESSED>" | ||
revision: "<REPLACE_REVISION>" | ||
path: "plugins/package-managers/cargo/src/funTest/assets/projects/synthetic/cargo-subcrate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters