-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Convert rustfmt from a submodule to a subtree #82208
Merged
+78,110
−37
Merged
Changes from all commits
Commits
Show all changes
4926 commits
Select commit
Hold shift + click to select a range
7926851
stop to strip 'impl' from impl trait type alias (#3816)
rchaser53 fb01dc8
do not force comments to be indented with a comment trailing a line o…
scampi 383306e
Update rustc-ap-* crates to 606.0.0 (#3835)
topecongiro ed697c9
fix: support raw prefix identifiers in statics
calebcartwright 61f972b
Merge pull request #3838 from calebcartwright/static-raw-ident-prefix
scampi ba4bf03
don't fail on recoverable parser errors in ignored files (#3782)
calebcartwright e53e0f8
Cargo update
topecongiro 2934ec5
Update CHANGELOG.md
topecongiro 33e3667
Release v1.4.9
topecongiro 160c3aa
handle hard tabs when formatting trailing comments (#3836)
scampi 8073244
improve detection of URL inside a string that is being rewritten. (#3…
scampi 6dcbc5d
fix: handle block comments with trailing line comments (#3842)
calebcartwright 207a58f
fix panic on closure with empty block expr (#3846)
calebcartwright 396a2af
fix to swallow attribute on brace expression (#3848)
rchaser53 8210cc1
fix: handle lhs unary in range expression (#3855)
calebcartwright a15e97f
do not indent impl generics (#3856)
scampi 28be779
fix: nested comments in control flow condition pat
calebcartwright fd6e960
fix: comments between lhs and rhs
calebcartwright 0497a7d
bump rustc-ap crates (#3870)
RalfJung a5d16df
feat: use offline by default with cargo fmt (#3830)
calebcartwright 5327c36
handle field attributes when aligning a struct's fields (#3513)
scampi 3a073f1
fix: handling of newline_style conflicts (#3850)
calebcartwright 69c7dbc
Try to solve issue3456. (#3556)
xiongmao86 233497a
fix Unparsable code when formmating (#3883)
rchaser53 69cf483
fix handling of nested comments in patterns and ControlFlows (#3869)
topecongiro 99f9f57
Return an error if `--check` or `--emit json` are used with stdin. (#…
jugglerchris d5b1832
Cargo update
topecongiro e47aae7
Release v1.4.10
topecongiro 731f155
Do not add block around async closure (#3946)
topecongiro 1838235
Release v1.4.11
topecongiro c60416e
deps: update rustc-ap to v642.0.0
calebcartwright e72f307
fix: backport parse bug fix
calebcartwright 760bb29
chore: fix compile warnings
calebcartwright 9f53665
rustfmt 1.x bump rustc-ap to v642 (#4043)
topecongiro 7a76ec0
deps: bump to rustc v644
calebcartwright 9699c96
deps: bump to rustc v647
calebcartwright bd5dff4
refactor: backport syntux mod
calebcartwright 9b0ed57
refactor: parse & mod resolver for rustc-ap v650
calebcartwright bea7209
chore: fix src formatting
calebcartwright 537d746
fix: use correct ForeignItem span
calebcartwright c1a66e1
fix: unreachable err on Fn with `None` block
calebcartwright b173b42
refactor: rename libsyntax --> rustc_ast
calebcartwright ac2d5b8
deps: bump rustc-ap* to v651
calebcartwright 9714a14
refactor: use ast::attr:HasAttrs
calebcartwright 5ca3d02
Merge pull request #4100 from calebcartwright/rustfmt1x-rustc-v650
Manishearth 00e199c
backport new syntax to rustfmt 1.x (#4105)
calebcartwright c126730
fix: formatting arbitrary extern abi (#4089)
calebcartwright ca4eba5
Bump rustc-ap* crates to 654.0.0 (#4121)
topecongiro a5cb5d2
Release v1.4.14
topecongiro 577ef81
Update rustc-ap-* crates to 659.0.0 for rustfmt-1.4.15 (#4184)
topecongiro 770ad7b
Cargo update
topecongiro aedff61
Release v1.4.15
topecongiro 08776ef
Support module-level rustfmt::skip in sub-modules
topecongiro ef1bb58
Bump parking_lot
topecongiro de8238c
Release v1.4.17
topecongiro de4ff81
deps: bump rustc-ap* to v664
calebcartwright b28fd5f
deps: apply upstream rustc-* changes
calebcartwright bc9a0b2
Switch to std::error::Error for errors (#3948)
dtolnay dead3a8
fix: backport mod resolution error handling
calebcartwright ce1a3ef
fix: backport fix for submod parser errors
calebcartwright 0767a09
deps: bump structopt (and proc-macro-error)
calebcartwright 5db7152
fix: backport fix for #4020
calebcartwright 796d6ea
fix: backport fix for #4079
calebcartwright 4d36560
Merge pull request #4253 from calebcartwright/rustfmt-1.4.18
topecongiro c1e9b7b
Release v1.4.18
topecongiro a36e7c7
Use correct span for match arms with the leading pipe and attributes …
topecongiro da18032
deps: bump rustc-ap* to v666
calebcartwright b243075
deps: bump rustc-ap-* to v668
calebcartwright 391cd3e
deps: bump rustc-ap to v669
calebcartwright bf359c6
chore: backport 8157a3f0afe978d3e953420577f8344db7e905bf
calebcartwright cef1c0d
preparation for potential rustfmt 1.4.19 (#4283)
topecongiro a88f028
deps: bump rustc-ap to v671 (#4356)
calebcartwright a178031
fix: inverted span on attrs within closure
calebcartwright 48f6c32
tests: add system tests for inverted span issue
calebcartwright e4617e0
deps: bump rustc-ap to v672
calebcartwright 637ddfb
deps: bump rustc-ap to v673
calebcartwright d00849e
deps: bump rustc-ap to v677
calebcartwright aa11c27
chore: run rustfmt
calebcartwright 89b7f5f
Fix module resolution in inner modules with paths (#4194)
mahkoh 62dc7c5
fix: inner attribute formatting
calebcartwright 01f2ead
bump rustfmt version to v1.4.21
calebcartwright 9ba373f
deps: bump rustc-ap to v678
calebcartwright 8635a5c
deps: bump rustc-ap to v679
dtolnay 146578c
Add regression test for unsafe mods
dtolnay 4908ee1
tests: add tests for leading pipe config
calebcartwright f6b9625
docs: add config info for match_arm_leading_pipes
calebcartwright d6a220b
feat: support config. of leading match arm pipe
calebcartwright 8eedd82
ci: backport GHA workflows
calebcartwright a15800a
Preserve and format type aliases in extern blocks
ayazhafiz a9b0b05
fixup! Preserve and format type aliases in extern blocks
ayazhafiz 92ab76c
fixup! Preserve and format type aliases in extern blocks
ayazhafiz 2a8ff20
fixup! Preserve and format type aliases in extern blocks
ayazhafiz 14d53f7
Use rustfmt given by RUSTFMT env var (#4419)
dtolnay bdb1c44
refactor: move env/osstr imports to avoid warnings
calebcartwright 97d0301
Release v1.4.22
calebcartwright d95a287
deps: bump rustc-ap to v683
calebcartwright c89638a
deps: update macro parsing
calebcartwright 31cef56
feat: add initial support for ConstBlock expressions
calebcartwright 2866634
deps: bump rustc-ap to v684
calebcartwright e70343a
Correctly indent skipped-over code
ayazhafiz 6a78247
Preserve comments in empty statements (#4180)
ayazhafiz fa9d974
Fix overriding license header bug (#4488)
cmichi e131797
deps: bump rustc-ap to v686
calebcartwright 9faba45
fix(parser): better unclosed delims handling
calebcartwright 86a41bc
tests: add test for panic on new_parser_from_file
calebcartwright 2b6226c
fix: resolve some parser related bugs
calebcartwright 98975e1
tests: adjust some cherry-picekd tests
calebcartwright 278e8da
Add some basic tests for `try{}` expressions
scottmcm 15854e5
feat: v2 support for nested tuples w/o spaces
calebcartwright fb517f4
ci: fix asset upload workflow
calebcartwright ea97ec5
meta: bump rustfmt version to 1.4.23
calebcartwright 46ab144
Don't flatten a block containing a single macro call
Aaron1011 1139e6e
fix: remove comment from cherry-pick that v1.x doesn't handle
calebcartwright ae6b40e
fix: remove ignored depr attribute which now errors
calebcartwright eb894d5
meta: release v1.4.24
calebcartwright a613c57
feat: don't insert semi in macro_rules arm body
calebcartwright 0f29ff6
meta: release v1.4.25
calebcartwright dd32de7
fixup! Correctly create artificial span for formatting closure body
ayazhafiz ce13ff1
Correctly create artificial span for formatting closure body
ayazhafiz faf97a6
Fixed 'Incorrect comment indent inside if/else' issue. (#4459)
whizsid eed826f
tests: attributed comment-only blocks
calebcartwright 77c8c90
ci: restrict GHA workflow triggers on push
calebcartwright 293d7d0
meta: bump version to v1.4.26
calebcartwright 89f3830
fix: don't drop leading comments in extern
calebcartwright d003e3b
ci: update GHA workflows
calebcartwright 580d826
meta: bump to v1.4.27
calebcartwright 073cc38
Option to create groups for std, external crates, and other imports
MattX 0037862
fix: don't force a newline after an empty where clause
meiomorphism 581da52
deps: bump rustc-ap to v687
calebcartwright baee271
deps: bump rustc-ap crates to v691
calebcartwright 5b21602
deps: minor rustc_ast changes for v691
calebcartwright 4f32ce8
feat: support struct/slice destructuring
calebcartwright 5c0673c
refactor: update cfg_if attr parsing
calebcartwright 4d9fa00
feat: support underscore expressions
calebcartwright 48d30a4
chore: run rustfmt against source
calebcartwright 8e46225
Add a test
topecongiro 5ffccbb
Properly format function signature in extern blocks
ayazhafiz 3bf67c1
Don't drop blocks on foreign functions
ayazhafiz e7ecdc1
Remove `async fn` from extern block tests
dtolnay c77c6a4
Compare code block line indentation with config whitespace (#4166)
ayazhafiz 3df383a
fixes #4115, #4029, #3898
ahl c735994
tests
ahl fb7e604
tests: backport an additional test case
calebcartwright 5e7fb45
Pick up comments between visibility modifier and item name (#4239)
ayazhafiz ea712f1
fix: apply rustc-ap updates to backported commit
calebcartwright 6455e9d
Fixed 'Comment removed between type name and =' issue (#4448)
whizsid b7c38c9
Fixed comment dropped between & and type issue (#4482)
whizsid 823c4f8
fix: backport some imports for cherry-picked commit
calebcartwright 7d9ee75
Comment between typebounds (#4474)
whizsid 29f33eb
meta: bump to v1.4.28
calebcartwright 96ee060
Preserve polarity on negative non-trait impl
dtolnay c40a8c1
Add negative impl test
dtolnay 70ce182
meta: bump to v1.4.29
calebcartwright 4cfb9ef
fix: don't strip nonexistent comma in derive
calebcartwright c536d80
Fix rewrite of closures with a return type
scampi 0d022d0
Format error and typeof types (#4416)
topecongiro acd9486
meta: bump to v1.4.30
calebcartwright d8e0d00
ci: fix linking issue on windows gnu jobs
calebcartwright 398d2f9
Add support for edition 2021.
m-ou-se 4644418
Fixes for new rustc changes.
m-ou-se a6b0c18
Bump rustc-ap to v697.
m-ou-se 5bb17a0
Account for new ast::GenericParamKind::Const::default in rust_ast.
m-ou-se b623eb3
Fix expected macro formatting test output.
m-ou-se f0eaaed
Add 2021 test.
m-ou-se c59b147
Update Cargo.lock.
m-ou-se 3571c5d
fix: maintain redundant semis on items in statement pos
calebcartwright b57469d
ci: add mingw to path for asset upload job
calebcartwright 4f9c794
meta: bump to v1.4.31
calebcartwright b30cb24
fix: indentation issue on generic bounds
calebcartwright c4d551c
refactor: remove unneeded clone
calebcartwright 590f6a1
meta: update license years
calebcartwright 216a643
meta: bump version v1.4.32
calebcartwright 7186375
Rename `merge_imports` to `imports_granularity` and add a `Module` op…
goffrie 0d60a61
Disable deprecated_option_merge_imports tests on non-nightly
goffrie 17bad2b
Tweak imports_granularity documentation
goffrie 2695846
Include constness in impl blocks (#4215)
ayazhafiz c0fede3
Use the span after generics and where clause (#4208)
topecongiro 152ccb5
Do not duplicate const keyword on parameters
topecongiro f8deed3
Include const generic type bounds in their spans
ayazhafiz 1102714
chore: update Changelog with const generic backports
calebcartwright 5e14f76
fix: Avoid incorrect global 'cfg_if' Symbol interning
smklein 384ba68
Add imports_granularity="Item".
msmorgan 1e2b0b7
Added 4646 test case
vallentin 3e61326
Fixed semicolon getting moved into comment (fixes #4646)
vallentin bd4dc36
refactor: cleanup block check for statements
calebcartwright c13d245
chore: backport some empty block check fixes
calebcartwright f0fe48f
meta: bump to v1.4.33
calebcartwright d80a42f
tests: add case for issue 4675
calebcartwright b8f318c
fix: don't insert trailing comma on struct lit rest in mac def
calebcartwright ea268b9
meta: bump to v1.4.34
calebcartwright ead937b
Add arch name to archive files created in the upload workflow (#4679)
autarch 58ac85b
deps: bump rustc-ap crates to v701.0.0
calebcartwright 7db2ba8
deps: bump rustc-ap to v702
calebcartwright 82a6528
chore: bump toolchain file
calebcartwright 55d2620
meta: bump version to v1.4.35
calebcartwright 67faa61
deps: bump rustc-ap crates to v705
calebcartwright b80fdf2
chore: bump rust toolchain version
calebcartwright 9ed7511
deps: apply rustc-ap v705 changes to itemkind variants
calebcartwright 7de6968
meta: bump to v1.4.36
calebcartwright 6b64e30
Bump rustc-ap-* crates to version 706
thomaseizinger 6170948
Fix warnings
jyn514 4b0ed96
Fix for issue 4603 about extra macro body indentation (third version)
davidBar-On 432e09e
Add the use of rewrite_assign_rhs_with_comments to 1.x
davidBar-On c3a5111
Fix some clippy warnings
jyn514 ca4e9f4
Fix a `legacy_derive_helpers` warning
JohnTitor c5c348c
deps: bump rustc-ap crates to v708
calebcartwright cbd83b8
chore: add span creation util function
calebcartwright 2c63395
chore: apply pattern parsing changes
calebcartwright 612e8d5
refactor: apply rustc mod parsing changes
calebcartwright 83cbdf6
deps: bump rustc-ap crates to v709
calebcartwright a1dc57a
chore: apply AST HasAttrs->AstLike changes
calebcartwright f2bc4b5
deps: bump rustc-ap crates to v710
calebcartwright 4c617e8
deps: apply rustc module loading changes
calebcartwright 884cdb8
deps: bump rustc-ap crates to v711
calebcartwright bf1e47f
chore: bump toolchain
calebcartwright 748e595
deps: remove unused rustc_attr crate AP crate
calebcartwright ef57c5b
chore: bump rustc-ap crates to v712
calebcartwright 4948911
deps: apply rustc-ap-* v712 changes
calebcartwright c32f2ec
chore: fmt and cleanup
calebcartwright 01cdc15
chore: bump toolchain
calebcartwright 0bd2b19
chore: bump version and changelog
calebcartwright 6767c1d
Don't show CRLF tests as modified in the working directory
jyn514 61ee108
Use `rustc_private` instead of crates.io dependencies
jyn514 943b97c
Fix errors when `parallel_compiler` is enabled
jyn514 26fb3fa
Use rustup in CI to automatically determine the toolchain version needed
jyn514 0269eb1
docs: update configuration info
calebcartwright ea1611c
feat(config): expose all width heurstic options
calebcartwright 1bcc1f8
refactor: apply heuristic config changes in lib
calebcartwright a168d92
tests: augment heuristics tests
calebcartwright 78b0728
refactor: remove panics on misconfigured widths
calebcartwright 58157bb
Add some basic tests for chain_width use
ctz dac2423
Recognize when a block comment has been ended inside a string literal…
ChinYing-Li 84ff001
Add the case in duplicate issue (#4806) to the idempotent tests
ChinYing-Li ddb224a
Upgrade `annotate-snippets` to 0.8 (#4762)
JohnTitor f874147
fix: backport changes for latest rustc api comaptibility
calebcartwright 2a3635d
tests: remove snippets with inner attrs on non-block expressions
calebcartwright 8526ace
Rename span_to_string to span_to_diagnostic_string
cbeuw e4b5621
Only deal with LocalPath in conversion
cbeuw ef31361
Rename `RealFileName::Named` to `LocalPath`
cbeuw 927561a
Bump nightly version
cbeuw 7872306
chore: update gitattributes for files with windows style line endings
calebcartwright 0e61f62
add rustfmt crlf files to root gitattributes
calebcartwright e659b6d
Delete rustfmt submodule
jyn514 b2d45c0
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd…
calebcartwright 956e0ba
Update bootstrap for in-tree rustfmt
jyn514 b349437
Don't copy tool dependencies to the sysroot
jyn514 079d1c4
Update log to 0.4.14
jyn514 56fa9b4
Run toolstate jobs when src/tools/rustfmt is modified.
jyn514 08c7c61
should-skip-this: Check for changes between the master branch, not th…
jyn514 34368ec
ci(should-skip-this): only check commits when skip rule enabled
calebcartwright File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
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
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
Submodule rustfmt
deleted from
2a3635
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,26 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.rs] | ||
indent_size = 4 | ||
|
||
[tests/**/*.rs] | ||
charset = utf-8 | ||
end_of_line = unset | ||
indent_size = unset | ||
indent_style = unset | ||
trim_trailing_whitespace = unset | ||
insert_final_newline = unset | ||
|
||
[appveyor.yml] | ||
end_of_line = unset |
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 @@ | ||
* text=auto eol=lf | ||
tests/source/issue-3494/crlf.rs -text | ||
tests/source/comment_crlf_newline.rs -text | ||
tests/source/configs/enum_discrim_align_threshold/40.rs -text | ||
tests/target/issue-3494/crlf.rs -text | ||
tests/target/comment_crlf_newline.rs -text | ||
tests/target/configs/enum_discrim_align_threshold/40.rs -text |
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,85 @@ | ||
name: integration | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.integration }} | ||
strategy: | ||
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits | ||
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization. | ||
# In order to prevent overusing too much of that 60 limit, we throttle the | ||
# number of rustfmt jobs that will run concurrently. | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: | ||
integration: [ | ||
bitflags, | ||
error-chain, | ||
log, | ||
mdbook, | ||
packed_simd, | ||
rust-semverver, | ||
tempdir, | ||
futures-rs, | ||
rust-clippy, | ||
failure, | ||
] | ||
include: | ||
# Allowed Failures | ||
# Actions doesn't yet support explicitly marking matrix legs as allowed failures | ||
# https://github.community/t5/GitHub-Actions/continue-on-error-allow-failure-UI-indication/td-p/37033 | ||
# https://github.community/t5/GitHub-Actions/Why-a-matrix-step-will-be-canceled-if-another-one-failed/td-p/30920 | ||
# Instead, leverage `continue-on-error` | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error | ||
# | ||
# Failing due to breaking changes in rustfmt 2.0 where empty | ||
# match blocks have trailing commas removed | ||
# https://github.com/rust-lang/rustfmt/pull/4226 | ||
- integration: chalk | ||
allow-failure: true | ||
- integration: crater | ||
allow-failure: true | ||
- integration: glob | ||
allow-failure: true | ||
- integration: stdsimd | ||
allow-failure: true | ||
# Using old rustfmt configuration option | ||
- integration: rand | ||
allow-failure: true | ||
# Keep this as an allowed failure as it's fragile to breaking changes of rustc. | ||
- integration: rust-clippy | ||
allow-failure: true | ||
# Using old rustfmt configuration option | ||
- integration: packed_simd | ||
allow-failure: true | ||
# calebcartwright (2019-12-24) | ||
# Keeping this as an allowed failure since it was flagged as such in the TravisCI config, even though | ||
# it appears to have been passing for quite some time. | ||
# Original comment was: temporal build failure due to breaking changes in the nightly compiler | ||
- integration: rust-semverver | ||
allow-failure: true | ||
# Can be moved back to include section after https://github.com/rust-lang-nursery/failure/pull/298 is merged | ||
- integration: failure | ||
allow-failure: true | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
|
||
- name: run integration tests | ||
env: | ||
INTEGRATION: ${{ matrix.integration }} | ||
TARGET: x86_64-unknown-linux-gnu | ||
run: ./ci/integration.sh | ||
continue-on-error: ${{ matrix.allow-failure == true }} |
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,42 @@ | ||
name: linux | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: (${{ matrix.target }}, nightly) | ||
strategy: | ||
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits | ||
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization. | ||
# In order to prevent overusing too much of that 60 limit, we throttle the | ||
# number of rustfmt jobs that will run concurrently. | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
|
||
- name: build | ||
run: | | ||
rustc -Vv | ||
cargo -V | ||
cargo build | ||
|
||
- name: test | ||
run: cargo test |
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,39 @@ | ||
name: mac | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources | ||
# macOS Catalina 10.15 | ||
runs-on: macos-latest | ||
name: (${{ matrix.target }}, nightly) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ | ||
x86_64-apple-darwin, | ||
] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
|
||
- name: build | ||
run: | | ||
rustc -Vv | ||
cargo -V | ||
cargo build | ||
|
||
- name: test | ||
run: cargo test |
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.
I think we should move this after the CI_ONLY_WHEN_SUBMODULES_CHANGED check - it looks like GITHUB_BASE_REF won't be set unless this is a PR build, which might mean this fetch either goes off and does a bunch of network traffic (increasing chance of spurious failures) or errors out.
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.
Not 100% sure how well I followed the preceding discussion but took a pass at addressing this with ea6ec11 as an additional commit
The tools job was skipped which I guess that's expected/desired given that single commit?
Please lmk if that should instead be squashed on Joshua's previous commit. Otherwise if that's fine then someone else would need to let bors know as i don't have rights
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.
I would not expect the tools job to be skipped. If anything in the PR touches those files, I would expect it to retry. I can poke around, as I don't see an obvious reason why it isn't triggering.
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.
OK, I see the problem. Because the script sets
pipefail
, andgrep -q
returns immediately after a match,git
continues to emit output to a broken pipe which causes SIGPIPE, which causes the test to fail.I think the solution is to remove
--quiet
and add1> /dev/null 2>&1
after thegrep
command.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.
Oh, looks like git has its own
--quiet
flag that could be used. I'm not certain, but I think something like this could also work (and is faster):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.
the former seems to have sorted things but happy to switch to the latter if that's preferable
edit: or the latter since it's more amenable to the tidy check