about summary refs log tree commit diff
path: root/crates/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2021-09-13Merge #10199bors[bot]-62/+52
10199: fix: Fix Cargo.toml change detection r=lnicola a=lnicola Maybe fixes #9546 Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-09-13Shuffle code around to avoid an allocationLaurențiu Nicola-60/+50
2021-09-13Add proc-macro fixture directiveLukas Wirth-1/+2
2021-09-13Fix Cargo.toml change detectionLaurențiu Nicola-3/+3
2021-09-11removing seemingly unused dev deps.Giles Cope-1/+0
2021-09-11remove unused depsGiles Cope-1/+0
2021-09-09Use `todo!()` instead of `()` for missing fieldsJörg Sommer-0/+2
The generated code with `()` doesn't compile in most of the cases. To signal the developer there's something to do, fill in `todo!()`. Because the file *missing_fields.rs* contains the string `todo!()` it needs an exception for the test *check_todo*.
2021-09-07Rename `is_member` to `is_local`Jonas Schievink-3/+3
2021-09-06update to tracing-tree 0.1.10, which does not pull in syn.David Barsky-1/+1
2021-09-04Merge #10147bors[bot]-27/+32
10147: fix: don't panic if the client sends invalid request r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-09-04internal: deduplicateAleksey Kladov-33/+32
2021-09-04fix: don't panic if the client sends invalid requestAleksey Kladov-3/+9
2021-09-02fix error message for when DidChangeTextDocument path doesn't existAli-1/+1
2021-09-01fix: multi-token mapping aware find referencesJonas Schievink-13/+17
2021-08-31internal: reduce couplingAleksey Kladov-4/+5
tt is a data structure, data structures cant' go wrong, they shouldn't have the knowledge that the world outside of them has all kinds of errors.
2021-08-31internal: cleanup proc macro server error handligAleksey Kladov-4/+30
When dealing with proc macros, there are two very different kinds of errors: * first, usual errors of "proc macro panicked on this particular input" * second, the proc macro server might day if the user, eg, kills it First kind of errors are expected and are a normal output, while the second kind are genuine IO-errors. For this reason, we use a curious nested result here: `Result<Result<T, E1>, E2>` pattern, which is 100% inspired by http://sled.rs/errors.html
2021-08-31minor: improve readabilityAleksey Kladov-12/+12
naming, layout & comments help!
2021-08-31internal: split database loading time in anaysis-stats into componentsAleksey Kladov-19/+38
2021-08-30feat: improve CPU usageAleksey Kladov-3/+5
closes #9922 Turned out to be trivial after preliminary refactor. The intended behavior is that we schedule cache priming once ws become quiescent (that is, we fully load cargo project), and we continue to rschedule it until it completes (priming might get cancelled by user typing into a file).
2021-08-30internal: make scheduling control flow more obviousAleksey Kladov-54/+33
There should be only one place where we need to check if we want to start background activities.
2021-08-30internal: improve consistencyAleksey Kladov-17/+18
Let's have only one place where we start delayed ops
2021-08-30internal: more obviously correct code for cache priming progerssAleksey Kladov-18/+30
It doesn't make sense for the prime_caches itself send begin/end events -- the caller knows perfectly fine when they happen!
2021-08-30Merge #10005bors[bot]-3/+5
10005: Extend `CargoConfig.unset_test_crates` r=matklad a=regexident This is to allow for efficiently disabling `#[cfg(test)]` on all crates (by passing `unset_test_crates: UnsetTestCrates::All`) without having to first load the crate graph, when using rust-analyzer as a library. (FYI: The change doesn't seem to be covered by any existing tests.) Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-08-30Merge #10080bors[bot]-57/+96
10080: internal: don't shut up the compiler when it says the code's buggy r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-08-30internal: don't shut up the compiler when it says the code's buggyAleksey Kladov-57/+96
Wrapping state-modifying functions into a `catch_unwind` is wrong -- to do retry after failure, you need to have transactional semantics!
2021-08-30Merge #10079bors[bot]-2/+3
10079: internal: make upstream bug less annoying r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-08-30internal: make upstream bug less annoyingAleksey Kladov-2/+3
2021-08-30switch `log` crate to `tracing`Dezhi Wu-132/+168
2021-08-26minor: nicer way to defeat disjoint closure capturesAleksey Kladov-2/+4
Thanks https://internals.rust-lang.org/t/feature-idea-edition-dependent-names-replacing-standard-library-items/15198/27?u=matklad!
2021-08-26Extend `CargoConfig.unset_test_crates` to allow for efficiently disabling ↵Vincent Esche-3/+5
`#[cfg(test)]` on all crates without having to first load the crate graph
2021-08-25Fix reporting of build script errorsJonas Schievink-7/+17
2021-08-25Don't fetch build script output twiceJonas Schievink-8/+0
2021-08-24Merge #9993bors[bot]-0/+3
9993: feat: join lines merges assignments r=matklad a=unexge Closes https://github.com/rust-analyzer/rust-analyzer/issues/9967. ![Peek 2021-08-22 21-46](https://user-images.githubusercontent.com/16212576/130366571-3ebb1753-f8d5-4884-be8f-222cda71a2a7.gif) Co-authored-by: unexge <unexge@gmail.com>
2021-08-24internal: use idiomatic form of assertionsAleksey Kladov-4/+6
Ideally, we should just return an InvalidParameter dialog here, but that shows error message to the end user, and we generally avoid that
2021-08-22feat: join lines merges assignmentsunexge-0/+3
2021-08-22internal: incentivize rust-analyzed developers to fix panicsAleksey Kladov-26/+68
It's good that rust-analyzer doesn't belly-up on a panic in some random assist. It is less good that rust-analyzer devs only know that the assists are buggy when they are actively looking at the logs.
2021-08-22internal: remove unreasonable crate dependencyAleksey Kladov-8/+43
Proc macro expansion shouldn't know about salsa at all.
2021-08-22internal: reduce crate interdependenceAleksey Kladov-17/+28
I don't think there's anything wrong with project_model depending on proc_macro_api directly -- fundamentally, both are about gluing our pure data model to the messy outside world. However, it's easy enough to avoid the dependency, so why not. As an additional consideration, `proc_macro_api` now pulls in `base_db`. project_model should definitely not depend on that!
2021-08-20internal: prep to 2021 editionAleksey Kladov-4/+6
2021-08-15internal: optimize compile timeAleksey Kladov-3/+3
cargo llvm-lines shows that path_to_error bloats the code. I don't think I've needed this functionality recently, seems that we've fixed most of the serialization problems. So let's just remove it. Should be easy to add back if we ever need it, and it does make sense to keep the `from_json` function around.
2021-08-10Formatting issuesAndré Oliveira-1/+1
2021-08-10Remove debug logsAndré Oliveira-3/+0
2021-08-10Use local node_modules to allow the graph to load offlineAndré Oliveira-2/+2
- Fix some warnings
2021-08-10Use d3-graphviz for rendering crates graph on the extension sideAndré Oliveira-12/+3
2021-08-10Merge #9841bors[bot]-5/+35
9841: internal: print total size of source code in analysis-stats r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-08-10Update crates/rust-analyzer/src/cli/analysis_stats.rsAleksey Kladov-1/+1
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-08-10internal: print total size of source code in analysis-statsAleksey Kladov-5/+35
2021-08-10Merge #9830bors[bot]-0/+1
9830: Enable more assists to generate default trait body impls r=Veykril a=yoshuawuyts Enable more assists to benefit from trait body generation. Follow-up to #9825 and #9814. __edit:__ I'd like to move the existing tests to this new file too, but I'll do that in a follow-up PR. Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-08-10implement feedback from reviewYoshua Wuyts-1/+1
2021-08-10internal: unify subcommand handling between ra and xtaskAleksey Kladov-203/+197