-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 rust-analyzer to an in-tree tool #99603
Merged
Merged
Changes from all commits
Commits
Show all changes
10000 commits
Select commit
Hold shift + click to select a range
30680df
Auto merge of #12679 - a-kenji:fix-typos-hir, r=lnicola
bors d101439
Auto merge of #12627 - yue4u:fix/struct-variant-patterns, r=Veykril
bors afdbd6c
fix: infer lhs first on ordinary assignment expressions
lowr 649e1f5
fix: report type mismatch on identifier in destructuring assignments
lowr d1ac462
Auto merge of #12680 - lowr:fix/12428-regression, r=Veykril
bors 0039d6f
fix: Extract Function produces duplicate fn names
DorianListens cc0bb71
Auto merge of #12662 - DorianListens:dscheidt/extract-function-duplic…
bors e394000
fix: Extract function from trait impl
DorianListens 212f84a
Bump crossbeam-channel
lnicola 416787d
Bump anyhow
lnicola c7c314d
Bump quote
lnicola e6fcb23
Bump either
lnicola 2af61bc
Bump pulldown-cmark-to-cmark
lnicola 791f2a0
Bump smallvec
lnicola 87572be
Bump serde
lnicola b24ece5
Bump serde_json
lnicola 6669f38
Bump indexmap
lnicola 2d3f0b4
Bump semver
lnicola 9e7ca80
Bump cargo_metadata
lnicola a3011e5
Bump arbitrary and derive_arbitrary
lnicola 5381811
Bump tracing-subscriber
lnicola e05e6c6
Bump object
lnicola 78beb4c
Bump chalk
lnicola 993a19a
Bump the rest of the deps
lnicola 75b2232
Auto merge of #12681 - lnicola:bump-deps, r=lnicola
bors ccf854b
Improve documentation for buildScripts.overrideCommand / checkOnSave.…
flodiebold 5235732
Add back restartServerOnConfigChange option
flodiebold e1a8c0b
Auto merge of #12687 - flodiebold:override-docs, r=flodiebold
bors db49ac8
internal: Record all macro definitions in ItemScope
Veykril 383ee6a
internal: Update inert attribute list
Veykril 6edf624
Auto merge of #12690 - Veykril:inert-attrs, r=Veykril
bors 976d07e
fix: Fix unresolved proc macro diagnostics pointing to macro expansions
Veykril 2926ca0
Remove useless bors.toml
Rustin170506 0d9737a
Fix project root assert
Rustin170506 441e659
Complete associated type only in trait generic arg
xuhongxu96 fee5555
Auto merge of #12694 - hi-rustin:rustin-patch-bors, r=jonas-schievink
bors b9ba9fa
Add str_ref_to_string fix
Rustin170506 0f2eba5
Show only assoc type args in the correct arg pos
xuhongxu96 ad5a851
Code: use different schemes for the custom views
lnicola 00194ad
Auto merge of #12702 - lnicola:vscode-schemes, r=lnicola
bors 75fb3de
Handle generic args per arg index
xuhongxu96 0360ed5
check arg_idx >= n_params only if arg_idx >= n_required_params
xuhongxu96 d2fd137
Use `SmallVec` to slightly shrink `ModPath` size
c46570e
Auto merge of #12704 - jonas-schievink:smol-paths, r=jonas-schievink
bors 3248601
fix default type param value position
xuhongxu96 c296e77
Auto merge of #12695 - xuhongxu96:fix-12140, r=jonas-schievink
bors f0af913
publish workflow: Fix names for existing crates
davidlattimore 6f819e3
Remove unnecessary unsafe from format_args expansion
davidlattimore 09abd76
Auto merge of #12716 - davidlattimore:fix-publish-crate-names, r=lnicola
bors 6c6ae96
Update remaining GitHub URLs
df4ed94
Auto merge of #12722 - jonas-schievink:update-urls, r=jonas-schievink
bors 7181a39
Auto merge of #12676 - DorianListens:dscheidt/extract-fun-trait-impl,…
bors c419aa9
Auto merge of #12719 - davidlattimore:format-args-no-unsafe, r=jonas-…
bors 603b6fc
fix: Extract Function misses locals used in closures
DorianListens 2836dd1
Auto merge of #12706 - DorianListens:dscheidt/closure-args, r=DorianL…
bors 21062f9
fix: Improve suggested names for extracted variables
DorianListens 638abba
Fix test
Rustin170506 666343b
Auto merge of #12727 - DorianListens:dscheidt/extract-var-field-name,…
bors 03a62c1
Bump vscode-languageclient
lnicola b43708c
Bump d3 and d3-graphviz
lnicola 1b138b1
Bump esbuild
lnicola 7b1b711
Bump eslint
lnicola 0e38961
Bump vsce
lnicola d03ed83
Bump @typescript-eslint
lnicola 8e889ac
Bump prettier
lnicola 2c9e395
Bump typescript and tslib
lnicola 358d6c6
Bump @types/node to 16
lnicola a059e79
Bump @vscode/test-electron
lnicola cb38145
Bump transitive npm deps
lnicola 5342f47
Auto merge of #12732 - lnicola:bump-npm, r=lnicola
bors 4b3164f
fix: ignore renames for crate root
harpsword eaebead
Fix config keys regarding imports in docs
TonalidadeHidrica 6e55716
Fix obsolete `loadOutDirsFromCheck` configs
TonalidadeHidrica 195ceea
Fix obsolete `diagnostics.experimental.enable`
TonalidadeHidrica f0649f2
Fix `rustcSource` -> `rustc_source`
TonalidadeHidrica dfcbed0
Fix obsolete `enableRangeFormatting` config
TonalidadeHidrica e3bde57
Fix obsolete `completion.snippets` config
TonalidadeHidrica d9ab7f2
Fix typos
Rustin170506 f7bb932
Auto merge of #12744 - hi-rustin:rustin-patch-typos, r=lnicola
bors df66eb7
Implement `ignore` and `index` metavar expression
caf23f2
Auto merge of #12745 - jonas-schievink:metavar-exprs, r=jonas-schievink
bors ebfbb31
Update 1.63 proc macro ABI to match rustc
4cbf23c
Auto merge of #12747 - jonas-schievink:proc-macro-abi-1.63, r=jonas-s…
bors 84a6bc9
Auto merge of #12742 - TonalidadeHidrica:fix-obsolete-config-keys, r=…
bors fc47ce5
Auto merge of #12696 - hi-rustin:rustin-patch-fix, r=Veykril
bors def89af
fix: Fix VSCode status bar tooltip not showing the error messages
Veykril 90b5097
Auto merge of #12754 - Veykril:vscode-status, r=Veykril
bors ec51dcb
fix: Set server binary version when distributing
Veykril 794ecd5
Auto merge of #12755 - Veykril:server-version, r=lnicola
bors a5ad4de
add tests
soruh 075ab03
fix: Support generics in extract_function assist
DorianListens 796641b
Make search for applicable generics more precise
DorianListens 4cbde4e
fix(completion): `super::` completion at crate root and module depth
feniljain 5af3ef5
Auto merge of #12735 - feniljain:fix-completions, r=feniljain
bors fbba1d7
Auto merge of #12691 - Veykril:proc-macro-diag, r=Veykril
bors 073b325
Auto merge of #12556 - DorianListens:dscheidt/generic-extract, r=Veykril
bors 6b823b0
fix: Fix imports being inserted before doc comments in inline modules
Veykril 029184d
Auto merge of #12765 - Veykril:import-insert-fix, r=Veykril
bors 7ff6c36
fix: Don't show qualified path completions for private items
Veykril f4fe2ea
Remove deprecate action
matklad 248fa55
Update .github/workflows/release.yaml
matklad b49f2a2
Remove deprecate action
matklad 4ad9185
Auto merge of #12764 - matklad:rustupaction, r=lnicola
bors 25090f0
internal: Remove allocation in DefCollector::reseed_with_unresolved_a…
Veykril 2e9d5b5
Auto merge of #12766 - Veykril:completion-vis, r=Veykril
bors d3796ad
Auto merge of #12772 - Veykril:nameres, r=Veykril
bors b96f8f1
fix: Improve self param completion applicability
Veykril 96481b7
Auto merge of #12773 - Veykril:self-compl, r=Veykril
bors c205c62
try fixing spurious CI failures on windows
matklad f2c2c36
Auto merge of #12776 - matklad:nosu, r=matklad
bors 0a4065d
Improve syntax fixup a bit, handle incomplete `if`
flodiebold 3d7da51
Auto merge of #12775 - flodiebold:syntax-fixup-if, r=flodiebold
bors ac526e0
Auto merge of #12712 - harpsword:fix-rename-crate-root, r=Veykril
bors 01d2517
Auto merge of #12539 - soruh:instanciate_empty_structs, r=Veykril
bors 766c5f0
Auto merge of #12689 - Veykril:macro-rec, r=Veykril
bors b9b42e8
tests: add hover tests for const generics
Logarithmus a96f0aa
feat: support negative const generic parameters
Logarithmus a0fd58b
Check for local IDs belong to same definition
iDawer 667fd25
Auto merge of #12781 - iDawer:hir_display.stack_overflow, r=lnicola
bors 15f7300
refactor: inline some variables
Logarithmus 83177a7
fix: address suggestions
Logarithmus db6a85d
Auto merge of #12778 - Logarithmus:feature/fix-negative-const-generic…
bors d9336a4
fix: un-inline `ConstScalarOrPath::from_expr_opt`
Logarithmus 897a7ec
Auto merge of #12785 - Logarithmus:feature/fix-negative-const-generic…
bors ea19e70
Fix extract variable assist for subexpression in mutable borrow
hasali19 b5aa3b3
fix: “Generate constant” ignores the path prefix of the identifier
harpsword 8e379ce
Auto merge of #12286 - harpsword:fix_generate_constant, r=Veykril
bors 6cb0746
Support the 1.64 nightly proc macro ABI
ee2d5fe
Auto merge of #12795 - jonas-schievink:proc-macro-abi-1.64, r=jonas-s…
bors be30c4d
chore: change str_ref_to_string to str_ref_to_owned
mmirate e2eaa99
Auto merge of #12788 - hasali19:extract-var-mut, r=jonas-schievink
bors 5ad981b
Remove outdated proc macro ABIs
e01de19
Auto merge of #12798 - jonas-schievink:trim-proc-macro-abis, r=jonas-…
bors 15016bc
Find original as node before compute ref match
Rustin170506 188c0e4
Remove macro ABI version from doc comment
ea41617
Auto merge of #12802 - rust-lang:jonas-schievink-patch-1, r=jonas-sch…
bors ec1142c
Improve file watcher config
38c11be
Move `convert_to_def_in_trait` into `ide-db`
Veykril 22e53f1
Auto merge of #12549 - bitgaoshu:goto_where_trait_m_impl, r=Veykril
bors fac6a64
Auto merge of #12804 - jonas-schievink:config-watcher, r=Veykril
bors 530eb27
Auto merge of #11819 - rust-lang:dependabot/npm_and_yarn/editors/code…
bors d17a5ef
Add simple support for completion item details
Veykril dc05192
Auto merge of #12807 - Veykril:completion-item-details, r=Veykril
bors ffb6b23
fix: Prevent panic in Remove Unused Parameter assist
DorianListens 567a5e9
Auto merge of #12796 - mmirate:patch-1, r=Veykril
bors 27b65ec
Add test case and token finder to address 12790
TopGunSnake 3203cb1
Added coverage for trait, mod, impl, and enum cases.
TopGunSnake 3cb78ff
Cleaned up trailing whitespace for tidy::files_are_tidy
TopGunSnake 09da74a
Added case for const
TopGunSnake 474f5ea
Work around Code bug with empty diagnostics
lnicola 88515b9
Auto merge of #12809 - lnicola:empty-diagnostics, r=lnicola
bors 1b41647
Upgrade to [email protected]
fasterthanlime 307be7c
Add CARGO_WORKSPACE_DIR env var in `.cargo/config.toml`
fasterthanlime 7d20ff3
Auto merge of #12817 - fasterthanlime:expect-test-1-4-0, r=lnicola
bors 30c4db1
Auto merge of #12789 - DorianListens:dscheidt/unused-param-overlappin…
bors 6df414f
Inverted the match logic to skip comments, attribute macros, and whit…
TopGunSnake 0e71356
Auto merge of #12800 - hi-rustin:rustin-patch-issue-12717, r=hi-rustin
bors 1c32fcf
Fix generated `PartialEq::ne`
SpecialMike c001b9c
Auto merge of #12821 - SpecialMike:fix-partial-eq-default, r=Veykril
bors 8454413
Auto merge of #12811 - TopGunSnake:12790, r=Veykril
bors cfc52ad
Add comments
lowr f3e9b38
Auto merge of #12646 - lowr:fix/11897, r=lowr
bors bb4bfae
fix: Fix search for associated trait items being inconsistent
Veykril 0ded8e7
Auto merge of #12825 - Veykril:trait-assoc-search, r=Veykril
bors 23d25a3
Enable extra warnings required by rust-lang/rust
fasterthanlime 816f7fe
Run cargo fix --edition-idioms
fasterthanlime 8318035
Fix last few warnings manually
fasterthanlime 7e285e1
Run cargo fmt
fasterthanlime e507807
internal: Don't eagerly construct `AstIdMap`s
Veykril 28bab68
Auto merge of #12826 - fasterthanlime:in-tree-warnings, r=Veykril
bors ade31ad
Rename proc macro server from 'Rustc' to 'RustAnalyzer'
fasterthanlime c520408
Allow merge commits when 'in-rust-tree' feature is enabled
fasterthanlime 100ea1d
Auto merge of #12828 - fasterthanlime:proc-macro-srv-naming, r=Veykril
bors d5b1ae6
Remove check_merge_commits test altogether
fasterthanlime 244f29b
Remove in-rust-tree feature
fasterthanlime bd4439f
Auto merge of #12829 - fasterthanlime:in-rust-tree-feature, r=Veykril
bors a88e088
Build proc-macro-test-impl out-of-tree
fasterthanlime 4375cf3
proc-macro-test build script: wipe before, be more verbose
fasterthanlime 898898d
Don't copy the Cargo.lock
fasterthanlime f504294
Add proc-macro-srv integration test that clones literals
fasterthanlime 9a8efe2
Update crates/proc-macro-test/build.rs
fasterthanlime 844aa8b
Update crates/proc-macro-test/build.rs
fasterthanlime 7dc36ee
Auto merge of #12831 - fasterthanlime:proc-macro-test-in-tmp-dir, r=f…
bors cd2c240
Auto merge of #12833 - fasterthanlime:literal-tests, r=Veykril
bors dcd52ec
Add PROC_MACRO_TEST_TOOLCHAIN environment variable
fasterthanlime fa883cb
Auto merge of #12834 - fasterthanlime:proc-macro-test-toolchain, r=Ve…
bors 315b0a7
Add sysroot-abi feature, copy 1.64 ABI fo rnow
fasterthanlime e009cdc
Move token_stream to separate module
fasterthanlime 00bc060
Fix imports, delete removed interfaces
fasterthanlime 191db9f
stub missing APIs
fasterthanlime d25b610
Add literal/ident conversion, tests pass
fasterthanlime 480f555
implement literal_from_str (poorly)
fasterthanlime c83f14a
Remove AstIdMap from Expander as it is seldom needed
Veykril 7bd2e30
Simplify
Veykril 2f6c390
Auto merge of #12827 - Veykril:be-lazy, r=Veykril
bors 10c7ee7
Simplify
Veykril 1aadd9d
internal: Use itemtree for variant and field attribute collection
Veykril 5f9a582
Use ItemTree for crate root attr_query collection
Veykril cfad882
fix: Fix `trait_impls_in_deps_query` being called directly instead of…
Veykril 84a6fac
Auto merge of #12841 - Veykril:query-fix, r=Veykril
bors fdddd83
Assert that sysroot ABI version matches exactly
fasterthanlime bbaf4da
Pass tidy checks
fasterthanlime 3076959
Move version string to RustcInfo, read '.rustc' section only once
fasterthanlime 05d8f5f
Use a thread-local for the symbol interner (1/2)
fasterthanlime 32ee097
Run proc macro expansion in a separate thread (for the thread-local i…
fasterthanlime 36d825f
Add test for literals created client-side
fasterthanlime 9cf99a9
Stringify literals create client-side properly
fasterthanlime 941416a
Add test for idents incl. raw idents
fasterthanlime 246947b
Fix raw ident handling (a little)
fasterthanlime 48bcc22
Move interner methods to Symbol, return SmolStr directly since it's r…
fasterthanlime 39db9cd
Use std::panic::resume_unwind
fasterthanlime e591ff3
Add comment about replacing crossbeam with std scoped threads when th…
fasterthanlime cb8a3be
Auto merge of #12835 - fasterthanlime:sysroot-abi, r=fasterthanlime
bors 1ab862a
fix: Improve syntax highlighting in attributes
Veykril 7e30ca1
Auto merge of #12844 - Veykril:highlight-attr, r=Veykril
bors 0081ef3
Use ItemTree for modules in attrs_query
Veykril d469e0d
Auto merge of #12840 - Veykril:be-lazy, r=Veykril
bors f1b5e38
Revert 03a62c180e6a7300d0d7b8c4d680b749c101bcbb
Veykril 8272d2a
Auto merge of #12847 - Veykril:vscode-downgrade, r=Veykril
bors cb6703f
internal: Don't parse files unnecessarily in scope_for_offset
Veykril e223d20
fix: Fix error tooltip message for VSCode status bar item
Veykril fbb1337
Auto merge of #12850 - Veykril:display-fix, r=Veykril
bors 0b131bc
Auto merge of #12849 - Veykril:no-parse, r=Veykril
bors ff041bf
fix generate_new doc
RalfJung f3a46f6
Auto merge of #12854 - RalfJung:generate_new, r=Veykril
bors 13c83f9
fix: Don't add braces to 'if' completion in match guard position
DorianListens 2be0062
Auto merge of #12851 - DorianListens:dscheidt/if-completion-match-gua…
bors a436be4
feat: don't highlight the whole fn on return-type mismatch
matklad 5bd8443
internal: extract common code for adjusting diagnostic range
matklad 977e12a
Auto merge of #12859 - matklad:dont-color-the-whole-block-red-all-the…
bors 3c98486
Remove rust-analyzer submodule
fasterthanlime 43acb50
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a…
fasterthanlime 0f2266d
Convert rust-analyzer to 'in-tree' tool, pass 'in-rust-tree' feature …
fasterthanlime 9cf485c
Add check step, stuck on 'no output generated for libgoto_def-hash rm…
fasterthanlime d59abcf
Check only tests and benches, not examples
fasterthanlime 4ea2f8e
Add test step for rust-analyzer, run it by default
fasterthanlime 4dedb58
Use compiler.stage
fasterthanlime d42b28a
Allow cross-compiling, build all crates
fasterthanlime 37ed531
Use top-level path in tool Step
fasterthanlime 44f50c5
Add comment about CARGO_WORKSPACE_DIR
fasterthanlime 107e265
Don't run slow tests in Rust CI, only RA CI
fasterthanlime 7534562
Disable all source-gen tests at compile time
fasterthanlime e0add21
Move cfg attrs up to the mod definitions to disable sourcegen
fasterthanlime ee09dc5
Small fixups
jyn514 1bb63df
Fix .gitattributes for test_data
fasterthanlime e436260
hir-def tests: sort results before comparing, since FxHashSet iterati…
fasterthanlime 4e1a302
Sort in DefMap::dump, since HashMap iteration order isn't defined
fasterthanlime 6c07c71
Sort when iterating through CrateGraph
fasterthanlime ee584c1
Make macros test order-resistant
fasterthanlime fa0037a
Only run proc-macro-srv tests for now (after discussion with @Veykril…
fasterthanlime 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
Submodule rust-analyzer
deleted from
897a7e
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,11 @@ | ||
[alias] | ||
xtask = "run --package xtask --bin xtask --" | ||
tq = "test -- -q" | ||
qt = "tq" | ||
lint = "clippy --all-targets -- -Aclippy::collapsible_if -Aclippy::needless_pass_by_value -Aclippy::nonminimal_bool -Aclippy::redundant_pattern_matching --cap-lints warn" | ||
|
||
[target.x86_64-pc-windows-msvc] | ||
linker = "rust-lld" | ||
|
||
[env] | ||
CARGO_WORKSPACE_DIR = { value = "", relative = 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,19 @@ | ||
# https://EditorConfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.{rs,toml}] | ||
indent_size = 4 | ||
|
||
[*.ts] | ||
indent_size = 4 | ||
[*.js] | ||
indent_size = 4 | ||
[*.json] | ||
indent_size = 4 |
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 @@ | ||
# for this file to take effect make sure you use git ^2.23 and | ||
# add ignoreFile to your git configuration: | ||
# ``` | ||
# git config --global blame.ignoreRevsFile .git-blame-ignore-revs | ||
# ``` | ||
|
||
# prettier format | ||
f247090558c9ba3c551566eae5882b7ca865225f |
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,9 @@ | ||
* text=auto eol=lf | ||
|
||
# git grep shouldn't match entries in this benchmark data | ||
bench_data/** binary | ||
|
||
# Older git versions try to fix line endings on images, this prevents it. | ||
*.png binary | ||
*.jpg binary | ||
*.ico binary |
10 changes: 10 additions & 0 deletions
10
src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/blank_issue.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Blank Issue | ||
about: Create a blank issue. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
26 changes: 26 additions & 0 deletions
26
src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/bug_report.md
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 @@ | ||
--- | ||
name: Bug report | ||
about: Create a bug report for rust-analyzer. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting | ||
Forum for questions: https://users.rust-lang.org/c/ide/14 | ||
|
||
Before submitting, please make sure that you're not running into one of these known issues: | ||
|
||
1. extension doesn't load in VSCodium: #11080 | ||
2. on-the-fly diagnostics are mostly unimplemented (`cargo check` diagnostics will be shown when saving a file): #3107 | ||
|
||
Otherwise please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3. | ||
--> | ||
|
||
**rust-analyzer version**: (eg. output of "Rust Analyzer: Show RA Version" command) | ||
|
||
**rustc version**: (eg. output of `rustc -V`) | ||
|
||
**relevant settings**: (eg. client settings, or environment variables like `CARGO`, `RUSTUP_HOME` or `CARGO_HOME`) |
17 changes: 17 additions & 0 deletions
17
src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/critical_nightly_regression.md
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,17 @@ | ||
--- | ||
name: Critical Nightly Regression | ||
about: You are using nightly rust-analyzer and the latest version is unusable. | ||
title: '' | ||
labels: '' | ||
assignees: 'matklad' | ||
|
||
--- | ||
|
||
<!-- | ||
Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting | ||
|
||
Please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3. | ||
--> | ||
|
||
This is a serious regression in nightly and it's important to fix it before the next release. | ||
@matklad, please take a look. |
8 changes: 8 additions & 0 deletions
8
src/tools/rust-analyzer/.github/actions/github-release/Dockerfile
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 @@ | ||
FROM node:slim | ||
|
||
COPY . /action | ||
WORKDIR /action | ||
|
||
RUN npm install --production | ||
|
||
ENTRYPOINT ["node", "/action/main.js"] |
21 changes: 21 additions & 0 deletions
21
src/tools/rust-analyzer/.github/actions/github-release/README.md
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,21 @@ | ||
# github-release | ||
|
||
Copy-pasted from | ||
https://github.com/bytecodealliance/wasmtime/tree/8acfdbdd8aa550d1b84e0ce1e6222a6605d14e38/.github/actions/github-release | ||
|
||
An action used to publish GitHub releases for `wasmtime`. | ||
|
||
As of the time of this writing there's a few actions floating around which | ||
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 | ||
actions/toolkit repository and packages published there. These run in a Docker | ||
container and take various inputs to orchestrate the release from the build. | ||
|
||
More comments can be found in `main.js`. | ||
|
||
Testing this is really hard. If you want to try though run `npm install` and | ||
then `node main.js`. You'll have to configure a bunch of env vars though to get | ||
anything reasonably working. |
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.
This looks pretty suspicious to me -- the comment is here for a reason, we shouldn't be expanding this list to arbitrary features, since that means that tools will eventually need cfg(bootstrap) internally, which is painful to support (for us and for the tools). Is there a reason we're not just using Std for rust-analyzer? That seems much more appropriate; it clearly doesn't actually build on stable.
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.
Hmm
Isn't there lots of stuff in bootstrap that already switches on Mode::Std? I worry changing it will break something else.
I do agree the proc macro server is inherently unstable; I guess the best thing to do is to switch and see what breaks. Don't have time for that today.
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, having thought about this more I think ToolStd is correct. If you look at when it was originally added, the motivation was to allow distros to build compiletest with the previous beta compiler. Before ToolStd, it would break on change to libtest.
So this does exactly what we want: it allows using nightly features from the standard library, but not language features in the nightly compiler. The fact that it happens to use the beta standard library for build scripts is just because the rustc shim is not very smart and does that unconditionally for all build scripts in stage 0.
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.
proc_macro_span and proc_macro_diagnostic are definitely language-y features, not just library features (even if their surface area is defined there). So I'm not sure I buy that argument fully.
In any case, it seems maybe OK to leave this until it causes us trouble down the line -- as long as rust-analyzer is a subtree it's not too hard to fix breakage caused by these features changing, hopefully.
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.
Sounds good. If it makes you feel better, this allows strictly fewer nightly features than before (it used to be ToolRustc) and the RA devs care a lot about being able to build on stable, so I think this is unlikely to break :)
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.
Well, clearly these features are being used by something that's not going to build on stable, and I'm much more likely to see breakage to them coming from modifications in rustc/std than from work on rust-analyzer, so this is not particularly reassuring :)
ToolRustc is in some ways better; it allows all nightly features, but we learn of breakage immediately. With ToolStd, we learn of breakage when we do a beta-bump, which is a terrible time. In rust-analyzer's case maybe we're lucky and they're already doing this same thing on their CI and will do a bump to rust-lang/rust in time, but there's a time and someone-is-running-CI-often component there that makes me concerned.
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.
Huh, that might explain why
x.py test --stage 0 rust-analyzer
used to work in my first subtree PR. And it might be the better choice here eventually. 🤔Again though, until you think this is a blocker for the merge, for now I'm worried about merge conflicts that would cause me to redo the whole PR (I don't mind doing it if we have a compelling reason, but it is time I'd rather spend elsewhere).
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.
That sounds unlikely. The shim uses beta libstd for all stage 0 build scripts regardless of the mode.
I am slightly unsure why @Mark-Simulacrum thinks we'd only catch breakage in beta, since this is only using features from std.
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.
Those features are thin shims over significantly larger surface area in the compiler (AFAIK), like the rest of proc-macro; the compiler used during the use of these features is presumably the stage0 beta, so you're not exercising any new code in the compiler until we bump that beta.
I continue to not believe this is a blocker for merging (otherwise I'd have r-'d), just flagging a concern, partially so that we can get on the same page and make sure @jyn514 is aware of this for future bootstrap changes, potentially unrelated to rust-analyzer. (Or that I'm aware that this is the wrong conclusion to draw, alternatively :)