-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure metadata of self-referential crates can be read. (#1035)
Also ensure that if reading metadata fails, we don't crash and instead just avoid checking manifest-related lints.
- Loading branch information
1 parent
2b67091
commit fe144fc
Showing
13 changed files
with
197 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
publish = false | ||
name = "semver_trick_self_referential" | ||
version = "0.2.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pub struct Example; |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
publish = false | ||
name = "semver_trick_self_referential" | ||
version = "0.1.1" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
# The "SemVer trick": reference a future major version of the package, and re-export its types | ||
# within the same *minor* version to offer a smoother upgrade process between major versions. | ||
self_ref = { package = "semver_trick_self_referential", path = "../future", version = "0.2.0" } |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pub use self_ref::Example; |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
publish = false | ||
name = "semver_trick_self_referential" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pub struct Example; |
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
35 changes: 35 additions & 0 deletions
35
...pshot_tests/cargo_semver_checks__snapshot_tests__semver_trick_self_referential-input.snap
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: src/snapshot_tests.rs | ||
expression: check | ||
snapshot_kind: text | ||
--- | ||
Check( | ||
scope: Scope( | ||
mode: DenyList(PackageSelection( | ||
selection: DefaultMembers, | ||
excluded_packages: [], | ||
)), | ||
), | ||
current: Rustdoc( | ||
source: Root("test_crates/semver_trick_self_referential/new/"), | ||
), | ||
baseline: Rustdoc( | ||
source: Root("test_crates/semver_trick_self_referential/old/"), | ||
), | ||
release_type: None, | ||
current_feature_config: FeatureConfig( | ||
features_group: Heuristic, | ||
extra_features: [], | ||
is_baseline: false, | ||
), | ||
baseline_feature_config: FeatureConfig( | ||
features_group: Heuristic, | ||
extra_features: [], | ||
is_baseline: true, | ||
), | ||
build_target: None, | ||
witness_generation: WitnessGeneration( | ||
show_hints: false, | ||
witness_directory: None, | ||
), | ||
) |
Oops, something went wrong.