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

[WIP] Bring rust-semverver in-tree and test that it builds. #73902

Closed
wants to merge 589 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
589 commits
Select commit Hold shift + click to select a range
64780e8
Better long error descriptions.
ibabushkin Apr 18, 2018
ffa3f92
Identified some places where issues might arise.
ibabushkin Apr 18, 2018
597b951
Properly implemented verbose error messages.
ibabushkin Apr 19, 2018
6797881
Updated README.
ibabushkin Apr 19, 2018
6bdc374
Version bump.
ibabushkin Apr 19, 2018
db38db1
Fixed build with newest nightly.
ibabushkin Apr 27, 2018
821fd10
Version bump.
ibabushkin Apr 27, 2018
840faf8
Fixed build with newest nightly.
ibabushkin May 11, 2018
f3b2512
Version bump.
ibabushkin May 11, 2018
9fa40f1
Updated README.
ibabushkin May 11, 2018
811b4d7
Fixed build with newest nightly.
ibabushkin Jun 2, 2018
815b7f8
Updated dependencies
ibabushkin Jun 2, 2018
708dfdd
Fixed bugs fresh out of the oven.
ibabushkin Jun 2, 2018
8dbc107
Version bump.
ibabushkin Jun 2, 2018
40b7b06
Fixed build with newest nightly.
ibabushkin Jun 10, 2018
9872995
Version bump.
ibabushkin Jun 10, 2018
c0dadae
Fixed build with newest nightly.
ibabushkin Jun 19, 2018
f43e7e9
Version bump.
ibabushkin Jun 19, 2018
8c44359
Fixed build with newest nightly.
ibabushkin Jun 30, 2018
39a0176
Version bump.
ibabushkin Jun 30, 2018
b720b3a
Fixed build with newest nightly.
ibabushkin Jul 22, 2018
6fcccb4
Version bump.
ibabushkin Jul 22, 2018
1738b59
Fixed build with newest nightly.
ibabushkin Aug 12, 2018
a5a05d3
Fixed build with nightly.
jebrosen Aug 22, 2018
7381d71
Fix compilation errors.
orium Sep 15, 2018
eb5facc
Now it works again :)
orium Sep 15, 2018
6abeba7
Updated dependencies.
orium Sep 16, 2018
1c41b77
Merge pull request #66 from orium/make-it-work-again
ibabushkin Sep 16, 2018
25f2068
Version bump.
ibabushkin Sep 16, 2018
3fe9b6b
Second version bump (we got out of sync for some reason).
ibabushkin Sep 16, 2018
8ce555f
Fixed build with newest nightly.
ibabushkin Sep 27, 2018
9988a47
Version bump.
ibabushkin Sep 27, 2018
5c784c0
Fixed build with newest nightly.
ibabushkin Oct 5, 2018
a1f8b3a
Version bump.
ibabushkin Oct 5, 2018
912189a
Fixed build with newest nightly.
ibabushkin Oct 20, 2018
db58210
Version bump.
ibabushkin Oct 20, 2018
45eac83
Fixed build with newest nightly.
ibabushkin Oct 21, 2018
bd2cd27
Version bump.
ibabushkin Oct 21, 2018
0c5c73e
Temporarily silence full tests
gnzlbg Nov 21, 2018
65d0d60
Remove already-stable feature
gnzlbg Nov 21, 2018
0515656
Allow type_alias_bounds in regions tests
gnzlbg Nov 21, 2018
046de6f
Allow type_alias_bounds in ty_alias tests
gnzlbg Nov 21, 2018
4e99125
Refactor example testing code.
gnzlbg Nov 21, 2018
f441863
Refactor full tests and add OSX support
gnzlbg Nov 21, 2018
cb2eeb1
Travis should test OSX
gnzlbg Nov 21, 2018
01a4186
Fix shellcheck issues
gnzlbg Nov 21, 2018
ce92b8a
Apply rustfmt
gnzlbg Nov 21, 2018
74784ad
Test rustfmt on CI
gnzlbg Nov 21, 2018
ae12205
Update outdated dependencies
gnzlbg Nov 21, 2018
b2337c3
Fix clippy issues
gnzlbg Nov 21, 2018
193969c
Update rand requirement from 0.5 to 0.6
dependabot-support Nov 21, 2018
ffbfd78
Fix exit of ci/run.sh script
gnzlbg Nov 21, 2018
09308fd
Test windows on CI
gnzlbg Nov 21, 2018
d7ad440
Run Windows tests on appveyor as well
gnzlbg Nov 26, 2018
9c40627
Add support for --target
gnzlbg Nov 26, 2018
fa51b61
Implement --api-guidelines flag to not diagnose non-technical breakin…
gnzlbg Nov 21, 2018
6a51f73
Merge branch 'gnzlbg-fix'
ibabushkin Dec 8, 2018
358f50f
Merge pull request #76 from rust-dev-tools/dependabot/cargo/rand-0.6
ibabushkin Dec 8, 2018
edc3141
Merge pull request #79 from gnzlbg/tar
ibabushkin Dec 8, 2018
2b16f74
Merge pull request #80 from gnzlbg/soft
ibabushkin Dec 8, 2018
b3f8a7d
Version bump.
ibabushkin Dec 8, 2018
f8fab65
Fix build in nightly
topecongiro Dec 19, 2018
8b46690
Update cargo and crates-io dependencies
gnzlbg Jan 2, 2019
e8ef017
Update paths from rust-lang-nursery to rust-dev-tools
gnzlbg Jan 2, 2019
eefc1ba
Merge pull request #82 from topecongiro/fix-nightly
ibabushkin Jan 2, 2019
fd1356c
Merge pull request #83 from gnzlbg/ec
ibabushkin Jan 2, 2019
5894a47
Merge pull request #84 from gnzlbg/dev_tools
ibabushkin Jan 2, 2019
29baebc
Update cargo to 0.34
gnzlbg Jan 3, 2019
b8dc61a
Fix clippy issues
gnzlbg Jan 3, 2019
4888c7d
Use patched cargo version until a better solution is available
gnzlbg Jan 3, 2019
5c20a31
Use PackageSet::get_one
gnzlbg Jan 3, 2019
085967b
Update rust-semverver driver
gnzlbg Jan 3, 2019
05f7dc6
Port to the 2018 edition and cargo-semver cleanups
gnzlbg Jan 4, 2019
ea32a4a
Merge pull request #88 from gnzlbg/e2018
ibabushkin Jan 7, 2019
2d1df7d
Implemented cargo build plan based compilation artifact discovery.
ibabushkin Jan 7, 2019
beb3aa8
Version bump.
ibabushkin Jan 7, 2019
ebb488f
Switched to a slightly less disgusting JSON parsing approach.
ibabushkin Jan 7, 2019
cc03ed7
Build with newest nightly.
ibabushkin Jan 7, 2019
b8d1c38
Version bump.
ibabushkin Jan 7, 2019
44e1c14
Fix build
gnzlbg Jan 30, 2019
bd26013
Merge pull request #89 from gnzlbg/fix_build
ibabushkin Jan 31, 2019
abed1d7
Fix compilation
gnzlbg Feb 13, 2019
3f703b6
Merge pull request #92 from gnzlbg/crate_features
ibabushkin Feb 18, 2019
fc08da9
Fix exit code of rust-semverver in tests
gnzlbg Feb 26, 2019
5a8c551
Correctly propagate rustc-semverver error in cargo-semver
gnzlbg Feb 26, 2019
d6f9281
Formatting
gnzlbg Feb 26, 2019
eff2d7d
Fix clippy issues
gnzlbg Feb 26, 2019
d430853
Fix whitespace in test file
gnzlbg Feb 26, 2019
b7e9ebd
Add support for libraries with build.rs
gnzlbg Feb 26, 2019
0b3e046
Formatting
gnzlbg Feb 26, 2019
6ee972f
Properly forward a requested target
gnzlbg Feb 26, 2019
4ee87d5
Add support for --no-default-features to cargo-semver
gnzlbg Feb 26, 2019
8bbf05b
Filter outputs by lib target_kind
gnzlbg Feb 27, 2019
bd29cd6
Merge pull request #93 from gnzlbg/fix_exit_code
ibabushkin Mar 1, 2019
dcf165e
Fixed libc test setup in vcs.
ibabushkin Mar 1, 2019
0a0fad2
Fixed build with newest nightly.
ibabushkin Mar 1, 2019
f1619fc
Version bump.
ibabushkin Mar 1, 2019
5a66eb4
Updated test output.
ibabushkin Mar 17, 2019
97534c5
Switched to the new rustc driver introduced in nightly.
ibabushkin Mar 17, 2019
e568434
Add `-q` flag to cargo-semver that limits output to important messsages
whentze Mar 21, 2019
f8f307a
remove awk dependency from tests/full.rs
whentze Mar 21, 2019
685da9f
Merge pull request #96 from whentze/less-awkward-tests
ibabushkin Mar 23, 2019
059b404
Version bump.
ibabushkin Mar 17, 2019
9022599
Fix build
gnzlbg Mar 26, 2019
ad94714
Formatting
gnzlbg Mar 26, 2019
c35c0fa
Bump version to 0.1.28
gnzlbg Mar 26, 2019
282227e
Merge pull request #98 from gnzlbg/fix_b
ibabushkin Mar 26, 2019
fc01b02
add dummy build.rs
whentze Mar 28, 2019
62af748
instead of shelling out to `git diff` in tests/full.rs, compare outpu…
whentze Mar 28, 2019
74f08e0
Merge pull request #100 from whentze/clean-tests
ibabushkin Mar 28, 2019
2a3feed
Fixed compiler warnings.
ibabushkin Apr 3, 2019
e2c07b5
Fixed build on newest nightly.
ibabushkin Apr 19, 2019
46b2b02
Version bump.
ibabushkin Apr 19, 2019
690ff68
Ran rustfmt.
ibabushkin Apr 20, 2019
bef6155
Fixed a number of clippy warnings.
ibabushkin Apr 20, 2019
1bd1d37
Appease clippy and rustfmt.
ibabushkin Apr 22, 2019
52e9456
Fixed build with newest nightly.
ibabushkin Apr 22, 2019
acd6303
Version bump.
ibabushkin Apr 22, 2019
f67e851
Fixed CI script by removing useless output.
ibabushkin Apr 24, 2019
8a0aa51
Partial fix for current nightlies.
ibabushkin May 16, 2019
0f26377
Made cargo plugin use a user agent when talking to crates.io. Fixes #…
ibabushkin May 19, 2019
4254f33
Version bump.
ibabushkin May 19, 2019
b946692
Fixed build with newest nightly.
ibabushkin May 24, 2019
51d949a
Version bump.
ibabushkin May 24, 2019
ba6ab95
Replaced erronously updated test output.
ibabushkin May 24, 2019
ec346e1
Fixed build for newest nightly.
ibabushkin May 29, 2019
708a534
Version bump.
ibabushkin May 29, 2019
0d7eb17
Moved away from `git-diff`-based feature tests.
ibabushkin May 29, 2019
ba296e7
Semverver compiles again.
orium Jun 2, 2019
8d4d76d
Fix `dyn` is deprecated warnings.
orium Jun 2, 2019
1df1de2
Fix race condition when multiple cargo-semver ran concurrently.
orium Jun 2, 2019
69ff6f7
Fix impl trait visibility issue.
orium Jun 2, 2019
06d3616
Ran `cargo fmt`.
orium Jun 2, 2019
0d7f376
Fix clippy warnings.
orium Jun 2, 2019
97005d4
Improved test failure output when running full tests in travis.
orium Jun 2, 2019
30d2863
Updated cargo dependency.
orium Jun 2, 2019
d753b66
Fixed bits of the build.
ibabushkin Jun 6, 2019
6a9aaaa
Version bump.
ibabushkin Jun 6, 2019
8edc71f
Always update an index before using it.
orium Jun 7, 2019
741771f
Include diff when running on travis.
orium Jun 7, 2019
b915e06
Fix example tests on windows.
orium Jun 7, 2019
26073be
Disabled full test on windows when running on Travis.
orium Jun 8, 2019
625524f
Merge pull request #104 from orium/make-it-work
ibabushkin Jun 8, 2019
ca92884
Updated .travis.yml to have more notifications.
ibabushkin Jun 8, 2019
f001115
An attempt to fix windows runs on travis.
ibabushkin Jun 8, 2019
130dd8a
Fixed one of the remaining full tests on windows.
ibabushkin Jun 8, 2019
a97e1c9
Added output for remaining windows test case. Fixes #105.
ibabushkin Jun 8, 2019
749d206
Updated AppVeyor path configuration.
ibabushkin Jun 8, 2019
ce03305
Disabled some tests on appveyor for now.
ibabushkin Jun 8, 2019
8361ace
Stopped lying about passing options to cargo (see #97),
ibabushkin Jun 9, 2019
5e17913
Switched to cargo's `Source::download_now`.
ibabushkin Jun 9, 2019
083576b
Implemented --compact flag for #61.
ibabushkin Jun 9, 2019
f9180cb
Reviewed error explanations.
ibabushkin Jun 9, 2019
bdcc6cf
Fixed formatting.
ibabushkin Jun 9, 2019
0281613
Version bump.
ibabushkin Jun 9, 2019
ae7ae57
Implemented a basic vesion of exported type querying.
ibabushkin Jun 10, 2019
cc734ab
Applied rustfmt.
ibabushkin Jun 10, 2019
3d940f3
Polished the type output feature.
ibabushkin Jun 10, 2019
5e754f0
Version bump.
ibabushkin Jun 10, 2019
76a5ca3
Fixed build with newest nightly.
ibabushkin Jun 14, 2019
091939b
Version bump.
ibabushkin Jun 14, 2019
bdefd58
Implemented feature flag support.
ibabushkin Jun 15, 2019
182ad87
Fixed build with newest nightly.
ibabushkin Jun 15, 2019
602759e
Version bump.
ibabushkin Jun 15, 2019
0595417
Moved some bits into place to support offline mode.
ibabushkin Jun 15, 2019
160b1aa
Implemented something resembling offline mode.
ibabushkin Jun 15, 2019
865ac0e
Updated our public facade.
ibabushkin Jun 15, 2019
9f2daf8
Applied clippy lints.
ibabushkin Jun 19, 2019
646726d
Switched offline mode implementation to stable cargo.
ibabushkin Jul 6, 2019
04930f5
Merge branch 'offline_mode'
ibabushkin Jul 6, 2019
2b27295
Version bump.
ibabushkin Jul 6, 2019
d7522ee
Fixed debug logging for our purposes.
ibabushkin Jul 10, 2019
4bc8190
Fixed formatting for new rustfmt.
ibabushkin Jul 19, 2019
c6abc9a
Fixed build with newest nightly.
ibabushkin Jul 21, 2019
19d78da
Version bump.
ibabushkin Jul 21, 2019
056366b
Implemented a simple JSON output format (without spans).
ibabushkin Jul 22, 2019
1eeca02
Fixed formatting.
ibabushkin Jul 22, 2019
d5ca08e
Fixed a clippy warning.
ibabushkin Jul 22, 2019
eb8a45d
Implemented span serialization for JSON output.
ibabushkin Jul 24, 2019
2251332
Added docs for the JSON output mode.
ibabushkin Jul 24, 2019
91a1d91
Cope with missing rustfmt from nightly.
ibabushkin Jul 27, 2019
c8d2849
Fixed build with newest nightly.
ibabushkin Aug 9, 2019
6d3a8f6
Version bump.
ibabushkin Aug 9, 2019
f7d687c
Merge branch 'json_out'
ibabushkin Aug 9, 2019
9894b9c
Cleanup: clippy + rustfmt.
ibabushkin Aug 9, 2019
7be5099
Fixed some clippy warnings that didn't appear locally.
ibabushkin Aug 9, 2019
674aca7
Fixed build with newest nightly.
ibabushkin Aug 23, 2019
ff57065
Version bump.
ibabushkin Aug 23, 2019
d104e53
Fixed build on newest nightly.
ibabushkin Sep 9, 2019
f02043c
Version bump.
ibabushkin Sep 9, 2019
c8b8aef
Fixed #109.
ibabushkin Sep 18, 2019
eeaabc6
Version bump.
ibabushkin Sep 18, 2019
cad2a60
Applied rustfmt.
ibabushkin Sep 18, 2019
9608fcf
Fix compilation for the latest nightly.
orium Oct 11, 2019
607af5d
Ran rustfmt.
orium Oct 11, 2019
5996010
Fix test output (presentation only).
orium Oct 11, 2019
09b0d7f
Fix clippy errors.
orium Oct 12, 2019
f44f873
Do not fail the build if we can't compile the previously published se…
orium Oct 12, 2019
bd2c747
Merge pull request #110 from orium/fix-compilation
ibabushkin Oct 12, 2019
4225ead
Rustup to rustc 1.40.0-nightly (87cbf0a54 2019-11-01)
bjorn3 Nov 2, 2019
d0e3a3f
Add rustc-dev component on CI
bjorn3 Nov 3, 2019
6c7227d
Update README for rustc-dev component requirement
bjorn3 Nov 3, 2019
08f28be
Merge pull request #111 from bjorn3/rustup
ibabushkin Nov 5, 2019
023f943
Updated tests.
ibabushkin Nov 7, 2019
b1b0762
Fixed error reporting on field changes to structs.
ibabushkin Nov 7, 2019
0286d2b
Version bump.
ibabushkin Nov 7, 2019
054088a
Rustup to latest nightly
JohnTitor Feb 20, 2020
b6783e3
Version bump.
ibabushkin Apr 3, 2020
da11610
Rustup to the latest nightly
JohnTitor Apr 8, 2020
7dc1680
Fix/suppress clippy warnings
JohnTitor Apr 19, 2020
d9186ed
Update xcode version
JohnTitor Apr 19, 2020
550aae2
Add `x86_64-pc-windows-msvc` target on CI
JohnTitor Apr 19, 2020
d8595e6
Suppress pedantic lints
JohnTitor Apr 19, 2020
3122410
Merge pull request #116 from JohnTitor/rustup
Manishearth Apr 20, 2020
249aa30
Update `cargo` and `crates-io` dependencies
JohnTitor Mar 15, 2020
2903fa9
Merge pull request #117 from JohnTitor/use-anyhow
Manishearth Apr 21, 2020
9eef88e
Rustup to the latest nightly
JohnTitor Apr 29, 2020
81c26e0
Merge pull request #118 from JohnTitor/rustup
Manishearth Apr 29, 2020
504c234
Rustup to the latest nightly
JohnTitor May 6, 2020
f65b268
Update `cargo` and `crates-io` deps
JohnTitor Apr 29, 2020
a465781
Merge pull request #119 from JohnTitor/rustup
Manishearth May 6, 2020
7adba3a
Merge pull request #120 from JohnTitor/cargo-crates-io
Manishearth May 6, 2020
ac3af00
Rustup to the latest nightly
JohnTitor May 12, 2020
1c7200f
Merge pull request #121 from JohnTitor/rustup
Manishearth May 12, 2020
128f744
Rustup to the latest nightly
JohnTitor May 20, 2020
eb61d77
Merge pull request #122 from JohnTitor/const-equate
Manishearth May 20, 2020
fa3fc7a
Use rustup-toolchain-install-master on CI
JohnTitor May 20, 2020
eab2c00
Update stderr file
JohnTitor May 20, 2020
411cbcc
Skip installing semverver on Windows CI
JohnTitor May 21, 2020
2b96054
Merge pull request #123 from JohnTitor/rtim
Manishearth May 21, 2020
19b0f1d
Rustup to the latest nightly
JohnTitor May 25, 2020
cca51fd
Install llvm-tools
JohnTitor May 25, 2020
b55a3e7
Bless tests
JohnTitor May 25, 2020
3084a64
Merge pull request #124 from JohnTitor/rustup
Manishearth May 25, 2020
65cdbd3
Rustup to the latest nightly
JohnTitor May 29, 2020
65217be
Reduce cache size
JohnTitor May 29, 2020
5edcb42
Skip semverver installation on macOS as well
JohnTitor May 29, 2020
07a8199
Merge pull request #126 from JohnTitor/rustup
Manishearth May 29, 2020
b3d60d3
Setup GitHub Actions
JohnTitor May 29, 2020
952b2f0
Remove AppVeyor and Travis config
JohnTitor May 29, 2020
7f648dc
Update test
JohnTitor May 30, 2020
0bc63bb
Fix format
JohnTitor May 30, 2020
aa4e42f
Merge pull request #128 from JohnTitor/actions
Manishearth May 30, 2020
773b25a
Rustup to the latest nightly
JohnTitor Jun 2, 2020
51d313e
Update test
JohnTitor Jun 2, 2020
0bbdabf
Merge pull request #129 from JohnTitor/real-file-name
Manishearth Jun 2, 2020
2ca4fdf
Add 'src/tools/semverver/' from commit '0bbdabfc883a4e5c4d6dce21800b0…
eddyb Jul 5, 2020
f726125
tidy, rustfmt: skip src/tools/semverver.
eddyb Jun 30, 2020
0527be9
bootstrap: test that src/tools/semverver builds.
eddyb Jun 30, 2020
be7f4b3
semverver: update for rustc and Cargo changes.
eddyb Jun 30, 2020
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
47 changes: 46 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ dependencies = [
"cargo-test-support",
"clap",
"core-foundation",
"crates-io",
"crates-io 0.31.1",
"crossbeam-utils 0.7.2",
"crypto-hash",
"curl",
Expand Down Expand Up @@ -680,6 +680,21 @@ dependencies = [
"url 2.1.0",
]

[[package]]
name = "crates-io"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65949ecc100abd1df7d80740ee58afb599f2447c5011bbf5acb5a039a67607ca"
dependencies = [
"anyhow",
"curl",
"percent-encoding 2.1.0",
"serde",
"serde_derive",
"serde_json",
"url 2.1.0",
]

[[package]]
name = "crc32fast"
version = "1.1.2"
Expand Down Expand Up @@ -2376,6 +2391,18 @@ version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"

[[package]]
name = "quickcheck"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
dependencies = [
"env_logger 0.7.1",
"log",
"rand 0.7.3",
"rand_core 0.5.1",
]

[[package]]
name = "quine-mc_cluskey"
version = "0.2.4"
Expand Down Expand Up @@ -4170,6 +4197,24 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"

[[package]]
name = "semverver"
version = "0.1.46"
dependencies = [
"anyhow",
"cargo",
"crates-io 0.32.0",
"curl",
"env_logger 0.7.1",
"log",
"quickcheck",
"rand 0.7.3",
"rustc-workspace-hack",
"semver 0.9.0",
"serde",
"serde_json",
]

[[package]]
name = "serde"
version = "1.0.99"
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [
"src/tools/rustdoc-themes",
"src/tools/unicode-table-generator",
"src/tools/expand-yaml-anchors",
"src/tools/semverver",
]
exclude = [
"build",
Expand Down Expand Up @@ -69,6 +70,9 @@ cargo = { path = "src/tools/cargo" }
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }

# Cargo again but from `crates.io` (semverver uses that instead of a git dependency).
cargo = { path = "src/tools/cargo" }

# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
Expand Down
2 changes: 1 addition & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
# Installs chosen set of extended tools if `extended = true`. By default builds all.
# If chosen tool failed to build the installation fails. If `extended = false`, this
# option is ignored.
#tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src"]
#tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src", "semverver"]

# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
#verbose = 0
Expand Down
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ignore = [
"src/tools/rust-analyzer",
"src/tools/rust-installer",
"src/tools/rustfmt",
"src/tools/semverver",

# We do not format this file as it is externally sourced and auto-generated.
"src/libstd/sys/cloudabi/abi/cloudabi.rs",
Expand Down
6 changes: 5 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ impl<'a> Builder<'a> {
tool::Rustdoc,
tool::Clippy,
tool::CargoClippy,
tool::Semverver,
tool::SemverPublic,
tool::CargoSemver,
native::Llvm,
native::Sanitizers,
tool::Rustfmt,
Expand All @@ -380,7 +383,7 @@ impl<'a> Builder<'a> {
native::Lld
),
Kind::Check | Kind::Clippy | Kind::Fix | Kind::Format => {
describe!(check::Std, check::Rustc, check::Rustdoc, check::Clippy)
describe!(check::Std, check::Rustc, check::Rustdoc, check::Clippy, check::Semverver)
}
Kind::Test => describe!(
crate::toolstate::ToolStateCheck,
Expand Down Expand Up @@ -426,6 +429,7 @@ impl<'a> Builder<'a> {
test::RustdocJSNotStd,
test::RustdocTheme,
test::RustdocUi,
test::Semverver,
// Run bootstrap close to the end as it's unlikely to fail
test::Bootstrap,
// Run run-make last, since these won't pass without make on Windows
Expand Down
10 changes: 6 additions & 4 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,13 @@ macro_rules! tool_check_step {
}

tool_check_step!(Rustdoc, "src/tools/rustdoc", SourceType::InTree);
// Clippy is a hybrid. It is an external tool, but uses a git subtree instead
// of a submodule. Since the SourceType only drives the deny-warnings
// behavior, treat it as in-tree so that any new warnings in clippy will be
// rejected.
// Clippy and semverver are hybrids. They're external tools, but use git subtrees
// instead of submodules. Since the SourceType only drives the deny-warnings
// behavior, treat it as in-tree so that any new warnings will be rejected.
tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
// FIXME(eddyb) use `InTree` here as per the comment above, when Cargo can build
// with deny-warnings + `-Wrust_2018_idioms` (which it can't today).
tool_check_step!(Semverver, "src/tools/semverver", SourceType::Submodule);

/// Cargo's output path for the standard library in a given stage, compiled
/// by a particular compiler for the specified target.
Expand Down
39 changes: 39 additions & 0 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,45 @@ impl Step for Clippy {
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Semverver {
stage: u32,
host: Interned<String>,
}

impl Step for Semverver {
type Output = ();
const ONLY_HOSTS: bool = true;
const DEFAULT: bool = false;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/semverver")
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Semverver { stage: run.builder.top_stage, host: run.target });
}

/// Runs `cargo test` for semverver.
fn run(self, builder: &Builder<'_>) {
let stage = self.stage;
let host = self.host;
let compiler = builder.compiler(stage, host);

builder
.ensure(tool::CargoSemver { compiler, target: self.host, extra_features: Vec::new() })
.expect("in-tree tool");
builder
.ensure(tool::Semverver { compiler, target: self.host, extra_features: Vec::new() })
.expect("in-tree tool");
builder
.ensure(tool::SemverPublic { compiler, target: self.host, extra_features: Vec::new() })
.expect("in-tree tool");

// FIXME(eddyb) actually run tests from `src/tools/semverver`.
}
}

fn path_for_cargo(builder: &Builder<'_>, compiler: Compiler) -> OsString {
// Configure PATH to find the right rustc. NB. we have to use PATH
// and not RUSTC because the Cargo test suite has tests that will
Expand Down
7 changes: 7 additions & 0 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ pub fn prepare_tool_cargo(
|| path.ends_with("clippy")
|| path.ends_with("miri")
|| path.ends_with("rustfmt")
|| path.ends_with("semverver")
{
cargo.env("LIBZ_SYS_STATIC", "1");
features.push("rustc-workspace-hack/all-static".to_string());
Expand Down Expand Up @@ -604,6 +605,7 @@ macro_rules! tool_extended {
|tools| {
tools.iter().any(|tool| match tool.as_ref() {
"clippy" => $tool_name == "clippy-driver",
"semverver" => $tool_name == "rust-semverver",
x => $tool_name == x,
})
}),
Expand Down Expand Up @@ -659,6 +661,11 @@ tool_extended!((self, builder),
};
Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, {};
RustAnalyzer, rust_analyzer, "src/tools/rust-analyzer/crates/rust-analyzer", "rust-analyzer", stable=false, {};
// FIXME(eddyb) use `in_tree=true` for semverver, when Cargo can build
// with deny-warnings + `-Wrust_2018_idioms` (which it can't today).
CargoSemver, semverver, "src/tools/semverver", "cargo-semver", stable=false, {};
Semverver, semverver, "src/tools/semverver", "rust-semverver", stable=false, {};
SemverPublic, semverver, "src/tools/semverver", "rust-semver-public", stable=false, {};
);

impl<'a> Builder<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ set -e
# debugging: print out the saved toolstates
cat /tmp/toolstate/toolstates.json
python3 "$X_PY" test check-tools
python3 "$X_PY" test src/tools/clippy
python3 "$X_PY" test src/tools/clippy src/tools/semverver
37 changes: 37 additions & 0 deletions src/tools/semverver/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master

jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
toolchain:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- toolchain: x86_64-unknown-linux-gnu
builder: ubuntu-latest
os: linux
- toolchain: x86_64-apple-darwin
builder: macos-latest
os: macos
- toolchain: x86_64-pc-windows-msvc
builder: windows-latest
os: windows

name: nightly - ${{ matrix.toolchain }}
runs-on: ${{ matrix.builder }}

steps:
- uses: actions/checkout@v2

- name: Run tests
run: sh ci/run.sh ${{ matrix.os }}
40 changes: 40 additions & 0 deletions src/tools/semverver/.github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Style check

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master

jobs:
style_check:
strategy:
fail-fast: false

name: Shellcheck
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run tests
run: |
shellcheck --version
shellcheck ci/*.sh

- name: Update nightly
run: |
rustup update nightly

- name: rustfmt
run: |
if rustup component add rustfmt; then
cargo fmt --all -- --check
fi

- name: Clippy
run: |
if rustup component add clippy rustc-dev; then
cargo clippy --all
fi
5 changes: 5 additions & 0 deletions src/tools/semverver/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target/
**/*.rs.bk
Cargo.lock
*.rlib
tests/debug.sh
38 changes: 38 additions & 0 deletions src/tools/semverver/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing to semverver

Want to help developing semverver? Cool! See below on how to do that.

## Bug reports

If you encounter any unwanted behaviour from the tool, such as crashes or other unexpected
output, or if you think you have found a bug, please open an issue in GitHub's issue
tracker.

Please describe the steps to reproduce your problem, as well as what you expected to
happen, and what happened instead. It is also useful to include the output of your command
invocation(s) with the following environment: `RUST_LOG=debug RUST_BACKTRACE=full`.
Please paste it at https://gist.github.com if the output is longer than a 50 lines or so.

## Feature requests

If you want to see some functionality added to semverver, you can also open an issue. Make
sure to include what functionality you need exactly, why it is useful, and, depending on
the complexity and/or how related the functionality is to the core project goals, why you
think it should be implemented in semverver and not somewhere else.

## Working on issues

If you want to write code to make semverver better, please post in the issue(s) you want
to tackle, and if you already have an idea/proposed solution, you are welcome to summarize
it in case some discussion is necessary.

Here are some guidelines you should try to stick to:

* Please fork the repository on GitHub and create a feature branch in your fork.
* Try to keep your code stylistically similar to the already existing codebase.
* Commit your changes in compact, logically coupled chunks.
* Make sure `cargo test` passes after your changes.
* Run `rustfmt` on your code (for example by running `cargo fmt`).
* If possible, fix any issues `cargo clippy` might find in your code.
* Finally, make a pull request against the master branch on GitHub and wait for the CI to
find any outstanding issues.
Loading