-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
add no lib targets test #847
Merged
obi1kenobi
merged 28 commits into
obi1kenobi:main
from
suaviloquence:add-no-lib-targets-test
Aug 16, 2024
Merged
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
46a341f
Add snapshot testing with `insta`
suaviloquence 50a7e0b
temporary dead code allows
suaviloquence 7495147
explicitly disable backtraces
suaviloquence a01f75d
use `insta_cmd` for command snapshots
suaviloquence 72f99bc
move snapshot tests to lib tests
suaviloquence e3ab6e9
add snapshot bin test harness
suaviloquence 1ea8787
Revert "move snapshot tests to lib tests"
suaviloquence 67b6fa3
Add test for no lib targets in the workspace
suaviloquence e7ff25b
move snapshot outputs to lib tests
suaviloquence d1dd661
move snapshots directory to lib tests
suaviloquence 2c0f63a
Revert "move snapshots directory to lib tests"
suaviloquence 12b5de7
Revert "move snapshot outputs to lib tests"
suaviloquence 77bf46d
add test files
suaviloquence 697a336
Add snapshot testing with `insta`
suaviloquence 965222b
temporary dead code allows
suaviloquence fc492f6
explicitly disable backtraces
suaviloquence 25493bd
use `insta_cmd` for command snapshots
suaviloquence 66758df
move snapshot tests to lib tests
suaviloquence a2b15d1
add snapshot bin test harness
suaviloquence 77c38b3
fix docs
suaviloquence e71e36c
clippy fixes
suaviloquence 81f76bb
Merge branch 'add-snapshot' into add-no-lib-targets-test
suaviloquence ea64a90
fix merge ;(
suaviloquence 4643dd7
...
suaviloquence e0c4efe
remove old test file
suaviloquence c1424b7
Merge branch 'main' into add-no-lib-targets-test
suaviloquence 4fe39a4
unformat Cargo.toml
suaviloquence cdbefdd
clean up
suaviloquence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["bin_only"] |
6 changes: 6 additions & 0 deletions
6
test_crates/manifest_tests/no_lib_targets/new/bin_only/Cargo.toml
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,6 @@ | ||
[package] | ||
name = "bin_only" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
test_crates/manifest_tests/no_lib_targets/new/bin_only/src/main.rs
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 @@ | ||
fn main() {} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the addition of files under |
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,3 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["bin_only"] |
6 changes: 6 additions & 0 deletions
6
test_crates/manifest_tests/no_lib_targets/new/new/bin_only/Cargo.toml
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,6 @@ | ||
[package] | ||
name = "bin_only" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
test_crates/manifest_tests/no_lib_targets/new/new/bin_only/src/main.rs
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 @@ | ||
fn main() {} |
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,3 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["bin_only"] |
6 changes: 6 additions & 0 deletions
6
test_crates/manifest_tests/no_lib_targets/old/bin_only/Cargo.toml
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,6 @@ | ||
[package] | ||
name = "bin_only" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
test_crates/manifest_tests/no_lib_targets/old/bin_only/src/main.rs
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 @@ | ||
fn main() {} |
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,3 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["bin_only"] |
6 changes: 6 additions & 0 deletions
6
test_crates/manifest_tests/no_lib_targets/old/new/bin_only/Cargo.toml
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,6 @@ | ||
[package] | ||
name = "bin_only" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
test_crates/manifest_tests/no_lib_targets/old/new/bin_only/src/main.rs
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 @@ | ||
fn main() {} |
30 changes: 30 additions & 0 deletions
30
...s/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_no_lib_targets-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,30 @@ | ||
--- | ||
source: src/snapshot_tests.rs | ||
expression: check | ||
--- | ||
Check( | ||
scope: Scope( | ||
mode: DenyList(PackageSelection( | ||
selection: Workspace, | ||
excluded_packages: [], | ||
)), | ||
), | ||
current: Rustdoc( | ||
source: Root("test_crates/manifest_tests/no_lib_targets/new"), | ||
), | ||
baseline: Rustdoc( | ||
source: Root("test_crates/manifest_tests/no_lib_targets/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, | ||
) |
8 changes: 8 additions & 0 deletions
8
.../snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_no_lib_targets-output.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,8 @@ | ||
--- | ||
source: src/snapshot_tests.rs | ||
expression: result | ||
--- | ||
--- error --- | ||
no crates with library targets selected, nothing to semver-check | ||
note: only library targets contain an API surface that can be checked for semver | ||
note: skipped the following crates since they have no library target: bin_only |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, presumably?