Skip to content

⬆️ rust-analyzer #112305

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

Merged
merged 802 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
802 commits
Select commit Hold shift + click to select a range
4c5fd19
Render places in capture inlay hints
Veykril May 7, 2023
d3ce333
Auto merge of #14742 - Veykril:closure-capture-inlays, r=Veykril
bors May 8, 2023
b632c7d
Fix broken table
lnicola May 8, 2023
10637cf
Fix formatting
lnicola May 8, 2023
053741c
Remove duplicate command
lnicola May 8, 2023
aaed89a
Auto merge of #14763 - lnicola:dep-tree-fixes, r=lnicola
bors May 8, 2023
f8477d0
Hide deps panel outside of Rust projects and set missing category
lnicola May 8, 2023
c26a43d
Auto merge of #14764 - lnicola:deps-fixes-2, r=lnicola
bors May 8, 2023
b7cdd93
Auto merge of #14747 - oxalica:feat/arena-idx-range, r=HKalbasi
bors May 9, 2023
d4b668a
Prepare tidy.rs
hecatia-elegua May 10, 2023
2a182f3
Add doc(alias)-based method completion
hecatia-elegua May 10, 2023
a0db478
`generate_derive` no longer breaks indentation
ponyii May 6, 2023
e07d638
`add_missing_impl_members` no longer breaks indentation
ponyii May 8, 2023
49f1092
`add_missing_impl_members` and `add_missing_default_members` break in…
ponyii May 10, 2023
4b42acf
Add basic support for `augmentsSyntaxTokens`
Veykril May 10, 2023
91d5a68
Add config for disabling non standard lsp highlight tokens
Veykril May 11, 2023
b069eb7
Auto merge of #14777 - rust-lang:highlight, r=Veykril
bors May 11, 2023
a0a7860
Refactor
lowr May 11, 2023
34a9129
fix: `column!()` and `line!()` built-in macros return u32
lowr May 11, 2023
96113b7
Remove prelude fallback path for Rust <1.52.0
lowr May 10, 2023
3203ea8
Add `macro_use` prelude to `DefMap`
lowr May 11, 2023
f2a35de
Consider macro sub-namespace during name resolution
lowr May 11, 2023
9b33874
Auto merge of #14781 - lowr:patch/macro-subns-and-prelude, r=Veykril
bors May 11, 2023
7da80d4
Use double reference in debug derive
HKalbasi May 12, 2023
884dd8c
Auto merge of #14788 - HKalbasi:derive-impl-f, r=Veykril
bors May 12, 2023
cbcafd3
MIR episode 5
HKalbasi May 12, 2023
730286b
Restructure InlayHint, no longer derive properties from its kind
Veykril May 13, 2023
edd60f7
Simplify bind pat filtering
Veykril May 13, 2023
8e11685
Add macro modifier for highlighting tokens in macro calls
Veykril May 13, 2023
e9f9bc2
Auto merge of #14795 - Veykril:hl-macros, r=Veykril
bors May 13, 2023
f47caa6
Add AbsPath::absolutize
Veykril May 13, 2023
a7944a9
Auto merge of #14735 - Veykril:forbid-relative-json, r=Veykril
bors May 13, 2023
2e03b19
fix: Fix perf regression from symbol index refactor
Veykril May 13, 2023
db8f39c
Auto merge of #14797 - Veykril:symbol-query, r=Veykril
bors May 13, 2023
9fff960
Remove root from patched UNC windows path drives
mataha May 13, 2023
f38264f
Auto merge of #14799 - mataha:fix/root-in-verbatim-prefix, r=Veykril
bors May 13, 2023
e9ddb62
Expand more single ident macro calls upon their collection
lowr May 13, 2023
daa03b0
Auto merge of #14800 - lowr:patch/macro-subns-and-prelude, r=Veykril
bors May 13, 2023
cace5bb
fix: Fix process-changes duplicating change events
Veykril May 13, 2023
cbd14e9
Auto merge of #14801 - Veykril:process-changes-fix, r=Veykril
bors May 13, 2023
51e8b8f
Add metrics for unevaluated constants, failed mir bodies, and failed …
HKalbasi May 14, 2023
1bc7f8a
Support `#[macro_use(name, ...)]`
lowr May 14, 2023
431dd32
Unsized temporary is not an implementation error
HKalbasi May 14, 2023
206a0b5
Add timer for new items
HKalbasi May 14, 2023
e5c7228
Auto merge of #14808 - HKalbasi:metrics, r=HKalbasi
bors May 14, 2023
bc03418
Auto merge of #14746 - lowr:patch/associated-return-types, r=Veykril
bors May 15, 2023
b198815
Auto merge of #14775 - hecatia-elegua:doc-alias-methods, r=Veykril
bors May 15, 2023
1e6bd6c
Auto merge of #14794 - Veykril:inlay-kind-refac, r=Veykril
bors May 15, 2023
9e80c85
internal: Inline handlers module
Veykril May 15, 2023
9eb26a9
Auto merge of #14809 - lowr:patch/macro_use-filter, r=Veykril
bors May 15, 2023
2f8cd66
Auto merge of #14810 - Veykril:inline-module, r=Veykril
bors May 15, 2023
08dc0e2
feat: Render hover actions for closure captures and sig
Veykril May 15, 2023
ba8bcde
Also render coercions for ranged type hover on closures
Veykril May 15, 2023
b87ee91
feat: Highlight used trait assoc items when cursor is on trait import…
Veykril May 15, 2023
77be56b
fix(analysis-stats): divided by zero error
weihanglo May 16, 2023
22599ad
fix: place type inlay hints after the item and without left-padding
poliorcetics May 16, 2023
a6e5a91
Expand `format_args!` with more details
HKalbasi May 16, 2023
c12ede8
fix: Discriminant hints only render for datacarrying enums with primi…
Veykril May 16, 2023
478705b
fix: Diagnose non-value return and break type mismatches
Veykril May 16, 2023
a2fba7c
Add test for eager expanding of `format_args`
HKalbasi May 16, 2023
fd034be
Fix evaluating negative for floating point types
HKalbasi May 16, 2023
68a74de
Process `macro_use` prelude in semantic scope resolver
lowr May 17, 2023
88d2125
Auto merge of #14811 - Veykril:closure-hover, r=HKalbasi
bors May 18, 2023
d0768aa
Auto merge of #14812 - Veykril:highlight-trait-assoc, r=HKalbasi
bors May 18, 2023
72a1796
Auto merge of #14819 - weihanglo:divided-by-zero, r=lnicola
bors May 18, 2023
c4026bf
Auto merge of #14818 - poliorcetics:type-hints-after-item, r=Veykril
bors May 18, 2023
a20a08f
Auto merge of #14824 - Veykril:ty-diag-unit, r=Veykril
bors May 18, 2023
b7b026b
Auto merge of #14825 - HKalbasi:float-const-eval, r=Veykril
bors May 18, 2023
07baa17
Auto merge of #14828 - lowr:fix/macro_use_prelude_is_in_scope, r=Veykril
bors May 18, 2023
c06f088
Auto merge of #14823 - Veykril:discriminant-inlays, r=Veykril
bors May 18, 2023
d6dcfa5
internal: Less file parsing for symbol index generation
Veykril May 18, 2023
c7b0349
Auto merge of #14834 - Veykril:ty-diag-unit, r=Veykril
bors May 18, 2023
0028e73
fix: Force disable augmentsSyntaxTokens capability on VSCode
Veykril May 16, 2023
673008a
Auto merge of #14822 - Veykril:augmentsSyntaxTokens-vscode, r=Veykril
bors May 18, 2023
03fb131
fix: Fix bind pat hint padding
Veykril May 18, 2023
0a806fe
Auto merge of #14835 - Veykril:inlay-pad, r=Veykril
bors May 18, 2023
261047d
Fix layout for `hir_ty::Ty` and friends
HKalbasi May 18, 2023
1c0235e
Auto merge of #14802 - HKalbasi:layout, r=HKalbasi
bors May 18, 2023
099b5b3
internal: Bump rustc_lexer
Veykril May 18, 2023
e4977e7
Auto merge of #14836 - Veykril:rustc-lexer, r=Veykril
bors May 18, 2023
5c83e22
fix `format_args` expansion error with raw strings
HKalbasi May 18, 2023
4b577e2
Support c string literals
Veykril May 18, 2023
f9be796
Auto merge of #14820 - HKalbasi:format-args, r=HKalbasi
bors May 18, 2023
eab295c
Fix mir CString lowering not respecting the extra 0 byte for length calc
Veykril May 18, 2023
034d7c8
Auto merge of #14787 - HKalbasi:mir2, r=HKalbasi
bors May 18, 2023
3e528b8
Fix cstring literals construct &CStr not &str
Veykril May 18, 2023
9ce9567
Auto merge of #14837 - Veykril:rustc-lexer, r=Veykril
bors May 18, 2023
4adfbbf
partially support panic message in `MirEvalError`
HKalbasi May 18, 2023
09d1265
Auto merge of #14843 - HKalbasi:mir3, r=HKalbasi
bors May 18, 2023
b55fbd3
Add `moved-out-of-ref` diagnostic
HKalbasi May 18, 2023
54129fa
Auto merge of #14789 - HKalbasi:mir, r=HKalbasi
bors May 18, 2023
cae9660
Add layout info for enum variant and locals
HKalbasi May 18, 2023
e110696
Auto merge of #14845 - HKalbasi:layout, r=HKalbasi
bors May 18, 2023
23ce228
Reduce MIR memory usage
HKalbasi May 18, 2023
5857836
Fix `preorder_expr` skipping the `else` block of let-else statements
bm-w May 18, 2023
c0519da
Update crates/ide-db/src/syntax_helpers/node_ext.rs
Veykril May 19, 2023
e8ae2d3
Auto merge of #14848 - bm-w:fix/highlight-let-else-return, r=Veykril
bors May 19, 2023
c5ea2d7
handle match scrutinee in closure captures
HKalbasi May 19, 2023
60379da
resolve types in closure capture copy detection
HKalbasi May 19, 2023
ce93617
Auto merge of #14851 - HKalbasi:mir, r=HKalbasi
bors May 19, 2023
bb78059
Auto merge of #14847 - HKalbasi:layout, r=HKalbasi
bors May 19, 2023
92d6670
Consider block impls in `lookup_impl_assoc_item_for_trait_ref`
HKalbasi May 19, 2023
14dc1ac
internal: Shrink ProcMacroExpander from 8 to 4 bytes
Veykril May 20, 2023
4de8c09
Auto merge of #14857 - Veykril:perf, r=Veykril
bors May 20, 2023
ca6461c
Add proof-of-concept QoS implementation
lunacookies May 20, 2023
91f4fbe
Improve comments
lunacookies May 20, 2023
bb02ae7
Add doc comments for `QoSClass`
lunacookies May 20, 2023
a416248
Extract platform-specific QoS code into module
lunacookies May 20, 2023
a04d845
Auto merge of #14855 - HKalbasi:mir, r=HKalbasi
bors May 20, 2023
7b70988
fix: consider all tokens in macro expr when analyzing locals
lowr May 21, 2023
7ac161c
Auto merge of #14863 - lowr:fix/extract-fn-nested-tt, r=lnicola
bors May 21, 2023
09f6247
[editors/code] add markdown syntax highlighting to doc comments
AndreasBackx May 21, 2023
01f42d2
fix: introduce new type var when expectation for ref pat is not ref
lowr May 21, 2023
2120c91
Auto merge of #14872 - lowr:fix/ref-pat-with-type-var, r=HKalbasi
bors May 22, 2023
51ec2ce
Improve ast::make
alibektas Apr 16, 2023
12d4355
Remove double lookups from Interned
Veykril May 24, 2023
1d1a119
Auto merge of #14880 - Veykril:intern-double, r=Veykril
bors May 24, 2023
74d6826
expand: Change how `#![cfg(FALSE)]` behaves on crate root
Veykril May 22, 2023
2df56ca
Auto merge of #14755 - poliorcetics:clippy-fixes, r=Veykril
bors May 24, 2023
8ad70e7
Auto merge of #14866 - AndreasBackx:feature/doc-comments-markdown, r=…
bors May 24, 2023
578d994
Move on-type formatting request handler onto the main thread
lunacookies May 24, 2023
430bdd3
Run the main thread under the User Interactive QoS class
lunacookies May 24, 2023
2f840c2
Auto merge of #14874 - Veykril:crate-cfg, r=Veykril
bors May 24, 2023
c7ef6c2
internal: Replace Display impl for `Name`
Veykril May 24, 2023
a512774
Auto merge of #14752 - ponyii:fix/generate_derive_breaks_indentation,…
bors May 24, 2023
1222869
Fix #14557. Docs aliases can now be detected and used in searching fo…
alibektas May 14, 2023
21e5dc2
Auto merge of #14881 - Veykril:name-display, r=Veykril
bors May 25, 2023
e3dfcf2
Add context to overly long loop message
Veykril May 25, 2023
1c65613
Auto merge of #14889 - Veykril:overly-dbg, r=Veykril
bors May 25, 2023
b0f1766
use `::core` instead of `$crate` in `option_env!`
HKalbasi May 25, 2023
efd3094
Auto merge of #14890 - HKalbasi:dev, r=HKalbasi
bors May 25, 2023
7ef185d
evaluate `UnevaluatedConst` in unify
HKalbasi May 25, 2023
fcd3a6b
Auto merge of #14891 - HKalbasi:dev, r=HKalbasi
bors May 25, 2023
780349b
fix `need-mut` false positive in closure capture of match scrutinee
HKalbasi May 25, 2023
06d02e0
Auto merge of #14893 - HKalbasi:dev, r=HKalbasi
bors May 25, 2023
5b0e170
Allow users to override the .scip output file path
Wilfred May 25, 2023
615aaa4
Auto merge of #14894 - Wilfred:index_scip_path, r=lnicola
bors May 26, 2023
397c8e5
fix: don't try determining type of token inside macro calls
lowr May 26, 2023
b4e3fec
Auto merge of #14895 - lowr:fix/goto-type-def-tokens-in-tt, r=Veykril
bors May 26, 2023
c21d09f
insert type vars in function arguments
HKalbasi May 26, 2023
2fd9260
Auto merge of #14897 - HKalbasi:dev, r=HKalbasi
bors May 26, 2023
59f8827
Implement assist to replace named generic with impl
justahero Apr 26, 2023
95f5966
Fix removal of generic param from list
justahero May 15, 2023
ce1c853
Check param is not referenced in function
justahero May 26, 2023
d49924d
Choose & over ref, make nav target's name more intuitive.
alibektas May 26, 2023
8589a2d
Auto merge of #14849 - alibektas:14557n, r=Veykril
bors May 26, 2023
e78df83
Integrate feedback
justahero May 26, 2023
e963846
Auto merge of #14816 - justahero:gh-14626, r=Veykril
bors May 26, 2023
79fe11c
Shuffle some things around
Veykril May 26, 2023
a2b59b1
Report config errors via status
Veykril May 26, 2023
f876adf
Report flycheck errors via status
Veykril May 26, 2023
eee6872
Auto merge of #14901 - Veykril:errors, r=Veykril
bors May 26, 2023
be9cc0b
Render size, align and offset hover values in hex
Veykril May 26, 2023
3713c4b
Auto merge of #14904 - Veykril:hover-hex, r=Veykril
bors May 26, 2023
6bca9f2
Auto merge of #14859 - lunacookies:qos, r=lunacookies
bors May 26, 2023
7dfef85
fix: add a toggle to disable the dependency explorer.
davidbarsky May 26, 2023
08f0c29
Auto merge of #14906 - davidbarsky:davidbarsky/add-option-to-disable-…
bors May 26, 2023
aa65395
Update proc-macro-api for the new rustc metadata format
jyn514 May 26, 2023
2844240
Run CI on nightly rust when proc-macro-* crates change
Veykril May 26, 2023
934df69
Add the toolchain channel as a caching key for CI
Veykril May 26, 2023
ee8c18c
Fix out_dirs_check test on stable
Veykril May 26, 2023
9e6ae6b
Auto merge of #14909 - Veykril:ci-proc-macros, r=Veykril
bors May 26, 2023
35b208a
Filter out unused cargo features from config
Veykril May 26, 2023
7c81fff
Auto merge of #14910 - Veykril:cargo-features, r=Veykril
bors May 26, 2023
def3b5d
Remove outdated rustup installation issue description
mashuler May 26, 2023
05d63ef
Make rustup heading title match other titles
mashuler May 26, 2023
cd4bffd
Evaluate `UnevalutedConst` before trait solving
HKalbasi May 26, 2023
1b5523a
Auto merge of #14913 - HKalbasi:fix14844, r=HKalbasi
bors May 26, 2023
f6e3a87
Auto merge of #14914 - mashuler:fix-rustup-installation-description, …
bors May 27, 2023
2924fd2
Implement custom QoS-aware thread pool
lunacookies May 25, 2023
d0b001e
Use appropriate QoS classes throughout the codebase
lunacookies May 25, 2023
74bc2a4
Wrap platform-specific QoS in r-a-specific “thread intent”
lunacookies May 26, 2023
9ebaa85
Split test module for metavariable expressions
lowr May 23, 2023
0d4d1d7
Implement `${count()}` metavariable expression
lowr May 28, 2023
cea8442
Allow setting cfgs
Veykril May 26, 2023
150082b
Auto merge of #14878 - lowr:feat/metavar-expr-count, r=Veykril
bors May 28, 2023
6b46095
Make formatting a latency-sensitive request
lunacookies May 28, 2023
bbd9e41
Don't add --all-targets to runnables for no-std crates
Veykril May 26, 2023
8bc826d
Add diagnostic for `_` expressions (typed holes)
Veykril May 28, 2023
505fd09
Auto merge of #14916 - Veykril:typed-hole, r=Veykril
bors May 28, 2023
5136879
MIR episode 6
HKalbasi May 25, 2023
ab93475
Consider macro files when replacing nodes
lowr May 28, 2023
033e6ac
Verify name references more rigidly
lowr May 29, 2023
bc82952
Auto merge of #14892 - HKalbasi:mir, r=HKalbasi
bors May 29, 2023
51c3ab5
Auto merge of #14920 - lowr:fix/overhaul-named-struct-to-tuple-struct…
bors May 30, 2023
3514f2f
Render niches on hover
Veykril May 26, 2023
1275adc
Don't leak rustc Layout in hir layer
Veykril May 26, 2023
e8dbb8e
Auto merge of #14911 - Veykril:config-cfg, r=Veykril
bors May 30, 2023
be446c6
Auto merge of #14905 - Veykril:hover-hex, r=Veykril
bors May 30, 2023
76d8650
Auto merge of #14912 - Veykril:cargo-alltargets, r=Veykril
bors May 30, 2023
e33c0b4
Auto merge of #14842 - alibektas:internal/ast-make-improve, r=Veykril
bors May 30, 2023
3c86250
Add render configs for memory layout hovers
Veykril May 30, 2023
d2b3caa
Auto merge of #14929 - Veykril:hover-hex, r=Veykril
bors May 30, 2023
526507f
Auto merge of #14888 - lunacookies:multi-qos, r=Veykril
bors May 31, 2023
1570299
Remove const eval limit and implement an exponential backoff lint ins…
oli-obk Nov 2, 2022
ecb8616
fix: Don't duplicate sysroot crates in rustc workspace
Veykril May 31, 2023
bafa6c4
Auto merge of #14935 - Veykril:sysroot-dedup, r=Veykril
bors May 31, 2023
42450d2
Add signature help for tuple patterns and expressions
Veykril Jun 1, 2023
7d1bf70
Recover from leading comma in tuple pat and expr
Veykril Jun 1, 2023
0e28202
Insert missing expr/pat for leading comma tuples
Veykril Jun 1, 2023
7f2ac29
Auto merge of #14938 - Veykril:sig-help, r=Veykril
bors Jun 1, 2023
a7d604d
fix: Fix nav target calculation discarding file ids from differing ma…
Veykril Jun 1, 2023
117f9b7
Auto merge of #14939 - Veykril:nav-focus-ranges, r=Veykril
bors Jun 1, 2023
dc7c6d4
Slightly shrink `DefMap`
Veykril Jun 1, 2023
5c466cc
Refactor out some crate wide data in DefMap into nested struct
Veykril Jun 1, 2023
bdca349
Arc DefMap::data so the block def maps can share it
Veykril Jun 1, 2023
1e6406e
Move extern prelude into CrateData
Veykril Jun 1, 2023
54e3ef6
Rename nameres::CrateData to DefMapCrateData
Veykril Jun 1, 2023
f4c52b4
fix bug in labeled for loop desugaring
HKalbasi Jun 1, 2023
4458e7f
Auto merge of #14942 - HKalbasi:for-loop-label, r=HKalbasi
bors Jun 1, 2023
11b9371
Skip extern prelude path resolution in block def maps
Veykril Jun 1, 2023
0b4c09b
Auto merge of #14941 - Veykril:def-map, r=Veykril
bors Jun 1, 2023
f9e3b18
Add enum, reference, array and slice to `render_const_scalar`
HKalbasi Jun 2, 2023
0677c20
Auto merge of #14947 - HKalbasi:render-const, r=HKalbasi
bors Jun 2, 2023
c0e9b57
Improve assist to filter invalid params
justahero May 26, 2023
7738ff4
Auto merge of #14945 - justahero:gh-14626, r=Veykril
bors Jun 2, 2023
a6a27a7
Support floating point intrinsics in const eval
HKalbasi Jun 2, 2023
dfaca93
Auto merge of #14950 - HKalbasi:render-const, r=HKalbasi
bors Jun 2, 2023
aab7589
Fix string pattern matching in mir interpreter
HKalbasi Jun 2, 2023
7f3bfc6
Auto merge of #14951 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 2, 2023
f9c1a7d
fix: assignment operators are right associative
lowr Jun 3, 2023
dd0c29c
Auto merge of #14952 - lowr:fix/assignments-are-right-associative, r=…
bors Jun 3, 2023
f44fc27
Remove unnecessary `StorageDead`
HKalbasi Jun 3, 2023
e5c56cd
Auto merge of #14955 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 3, 2023
08f8919
Fix drop scopes in mir
HKalbasi Jun 3, 2023
4fb1df6
Auto merge of #14961 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 3, 2023
2d0510e
Add mandatory panic contexts to all threadpool tasks
Veykril Jun 4, 2023
de2320e
Auto merge of #14965 - Veykril:panic-ctx, r=Veykril
bors Jun 4, 2023
a1af9eb
Revert "Add mandatory panic contexts to all threadpool tasks"
Veykril Jun 4, 2023
48f8799
Auto merge of #14967 - rust-lang:revert-14965-panic-ctx, r=Veykril
bors Jun 4, 2023
f9a9e40
Update builtin attribute list
Veykril Jun 4, 2023
c4eb394
Auto merge of #14969 - Veykril:inert-attrs, r=Veykril
bors Jun 4, 2023
71f3e4b
Detect "bound more than once" error and suppress `need-mut` for it.
HKalbasi Jun 4, 2023
9d5c34a
Auto merge of #14970 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 4, 2023
275afd6
fix: consider outer binders when folding captured items' type
lowr Jun 4, 2023
a3789ea
Minor refactorings
lowr Jun 4, 2023
f549cac
Destructure `InferenceResult` in `resolve_all()`
lowr Jun 4, 2023
0408af6
Fix `unused-mut` false positive for `Box`
HKalbasi Jun 4, 2023
1742683
Auto merge of #14972 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 4, 2023
b4907a5
Fix missing terminator for slice pattern
HKalbasi Jun 4, 2023
5545961
Auto merge of #14976 - HKalbasi:mir-fix, r=HKalbasi
bors Jun 4, 2023
2f1b7ce
Auto merge of #14971 - lowr:fix/captured-item-ty-outer-binder, r=HKal…
bors Jun 4, 2023
5531d46
Emit `'_` for lifetime generics in `HirDisplay`
HKalbasi Jun 5, 2023
c6a3fe0
Auto merge of #14978 - HKalbasi:lifetime-display, r=HKalbasi
bors Jun 5, 2023
c3dbe7c
Merge remote-tracking branch 'upstream/master' into sync-from-rust
lnicola Jun 5, 2023
aa9bc86
Auto merge of #14980 - lnicola:sync-from-rust, r=lnicola
bors Jun 5, 2023
b8a7d43
Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-fro…
lnicola Jun 5, 2023
768a6c5
Add back sysroot-abi feature gate to rust-analyzer
lnicola Jun 5, 2023
ed87e0a
Auto merge of #14984 - lnicola:rm-test-gate, r=Veykril
bors Jun 5, 2023
6c1f108
Merge commit 'ed87e0a20a9d196a5ea659ea46ae9574be666d4f' into sync-fro…
lnicola Jun 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ perform github releases but they all tend to have their set of drawbacks.
Additionally nothing handles deleting releases which we need for our rolling
`dev` release.

To handle all this this action rolls-its-own implementation using the
To handle all this, this action rolls its own implementation using the
actions/toolkit repository and packages published there. These run in a Docker
container and take various inputs to orchestrate the release from the build.

Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git config --global user.name "GitHub Action"
rm Cargo.lock
# Fix names for crates that were published before switch to kebab-case.
cargo workspaces rename --from base-db base_db
Expand Down
53 changes: 42 additions & 11 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,35 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
typescript: ${{ steps.filter.outputs.typescript }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@4067d885736b84de7c414f582ac45897079b0a78
id: filter
with:
filters: |
typescript:
- 'editors/code/**'
proc_macros:
- 'crates/proc-macro-api/**'
- 'crates/proc-macro-srv/**'
- 'crates/proc-macro-srv-cli/**'
- 'crates/proc-macro-test/**'

rust:
needs: changes
if: github.repository == 'rust-lang/rust-analyzer'
name: Rust
runs-on: ${{ matrix.os }}
env:
CC: deny_c
RUST_CHANNEL: "${{ needs.changes.outputs.proc_macros == 'true' && 'nightly' || 'stable'}}"
USE_SYSROOT_ABI: "${{ needs.changes.outputs.proc_macros == 'true' && '--features sysroot-abi' || ''}}"

strategy:
fail-fast: false
Expand All @@ -35,30 +58,31 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 20

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
rustup component add rustfmt rust-src

- name: Cache Dependencies
uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e
uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
with:
key: ${{ env.RUST_CHANNEL }}

- name: Bump opt-level
if: matrix.os == 'ubuntu-latest'
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml

- name: Compile (tests)
run: cargo test --no-run --locked
run: cargo test --no-run --locked ${{ env.USE_SYSROOT_ABI }}

# It's faster to `test` before `build` ¯\_(ツ)_/¯
- name: Compile (rust-analyzer)
if: matrix.os == 'ubuntu-latest'
run: cargo build --quiet
run: cargo build --quiet ${{ env.USE_SYSROOT_ABI }}

- name: Test
run: cargo test -- --nocapture --quiet
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet

- name: Run analysis-stats on rust-analyzer
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -90,7 +114,7 @@ jobs:
rustup target add ${{ env.targets }} ${{ env.targets_ide }}

- name: Cache Dependencies
uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e
uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894

- name: Check
run: |
Expand All @@ -102,6 +126,7 @@ jobs:
done

typescript:
needs: changes
if: github.repository == 'rust-lang/rust-analyzer'
name: TypeScript
strategy:
Expand All @@ -114,45 +139,51 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
if: needs.changes.outputs.typescript == 'true'

- name: Install Nodejs
uses: actions/setup-node@v3
with:
node-version: 16
if: needs.changes.outputs.typescript == 'true'

- name: Install xvfb
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true'
run: sudo apt-get install -y xvfb

- run: npm ci
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

# - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
# if: runner.os == 'Linux'
# working-directory: ./editors/code

- run: npm run lint
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

- name: Run VS Code tests (Linux)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest' && needs.changes.outputs.typescript == 'true'
env:
VSCODE_CLI: 1
run: xvfb-run npm test
working-directory: ./editors/code

- name: Run VS Code tests (Windows)
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-latest' && needs.changes.outputs.typescript == 'true'
env:
VSCODE_CLI: 1
run: npm test
working-directory: ./editors/code

- run: npm run pretest
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

- run: npm run package --scripts-prepend-node-path
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

end-success:
name: bors build finished
Expand All @@ -165,7 +196,7 @@ jobs:

end-failure:
name: bors build finished
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
if: github.event.pusher.name == 'bors' && !success()
runs-on: ubuntu-latest
needs: [rust, rust-cross, typescript]
steps:
Expand Down
6 changes: 3 additions & 3 deletions src/tools/rust-analyzer/.github/workflows/publish-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- 'lib/**'
- "lib/**"

jobs:
publish-libs:
Expand All @@ -29,7 +29,7 @@ jobs:
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git config --global user.name "GitHub Action"
# Remove r-a crates from the workspaces so we don't auto-publish them as well
sed -i 's/ "crates\/\*"//' ./Cargo.toml
cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ jobs:
- name: Publish Extension (Code Marketplace, nightly)
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
working-directory: ./editors/code
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release

- name: Publish Extension (OpenVSX, nightly)
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
{
// Used for testing the extension with a local build of the LSP server (in `target/release`)
// with all other extendions loaded.
// with all other extensions loaded.
"name": "Run With Extensions",
"type": "extensionHost",
"request": "launch",
Expand Down
Loading