Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtree update of rust-analyzer #118365

Merged
merged 49 commits into from
Nov 27, 2023
Merged

Subtree update of rust-analyzer #118365

merged 49 commits into from
Nov 27, 2023

Commits on Oct 28, 2023

  1. override language client

    jprochazk committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    3e4de96 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. add configuration option

    jprochazk committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    c566136 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2023

  1. Configuration menu
    Copy the full SHA
    0647b64 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. Configuration menu
    Copy the full SHA
    6705860 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Configuration menu
    Copy the full SHA
    0d147b3 View commit details
    Browse the repository at this point in the history
  2. Update editors/code/package.json

    Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
    jprochazk and Veykril committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    9c8727e View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. fix missing assoc item

    Young-Flash committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    cfc881a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e95ec55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    59f5d51 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Configuration menu
    Copy the full SHA
    6a0e02d View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15917 - lnicola:sync-from-rust, r=lnicola

    internal: Sync from downstream
    bors committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    bc97821 View commit details
    Browse the repository at this point in the history
  3. address comment

    Austaras committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    808f668 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1cbda61 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a54c0da View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#15925 - lnicola:pathres-nodebug, r=lnicola

    internal: Remove debugging code in path resolution
    
    Closes rust-lang#15924
    bors committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    255eed4 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Auto merge of rust-lang#15885 - RunDevelopment:patch-1, r=lnicola

    Fix typo in highlight_related.rs
    
    While reading the user manual, I noticed a random tick, so I went ahead and fixed it. The `await` keyword should be properly rendered as inline code.
    
    ![image](https://github.com/rust-lang/rust-analyzer/assets/20878432/f134a4c9-e539-4635-97ac-506790893869)
    bors committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    3751429 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15911 - Young-Flash:fix_missing_assoc_item, r…

    …=lnicola
    
    fix: handle default constant values in `trait_impl_missing_assoc_item` diagnostic
    
    A patch of rust-lang/rust-analyzer#15895, close rust-lang/rust-analyzer#15909
    
    cc `@Veykril`
    bors committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    1a5cee1 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Auto merge of rust-lang#15940 - pascalkuthe:fix_rename, r=Veykril

    ensure renames happen after edit
    
    This is a bugfix for an issue I fould while working on helix. Rust-analyzer currently always sends any filesystem edits (rename/file creation) before any other edits. When renaming a file that is also being edited that would mean that the edit would be discarded and therefore an incomplete/incorrect refactor (or even cause the creation of a new file in helix altough that  is probably a pub on our side).
    
    Example:
    
    * create a module: `mod foo` containing a `pub sturct Bar;`
    * reexport the struct uneder a different name in the `foo` module using a *fully qualified path*: `pub use crate::foo::Bar as Bar2`.
    * rename the `foo` module to `foo2` using rust-analyzer
    * obsereve that the path is not correctly updated (rust-analyer first sends a rename `foo.rs` to `foo2.rs` and then edits `foo.rs` after)
    
    This PR fixes that issue by simply executing all rename operations after all edit operations (while still executing file creation operations first). I also added a testcase similar to the example above.
    
    Relevent excerpt from the LSP standard:
    
    > Since version 3.13.0 a workspace edit can contain resource operations (create, delete or rename files and folders) as well. If resource operations are present clients need to execute the operations in the order in which they are provided. So a workspace edit for example can consist of the following two changes: (1) create file a.txt and (2) a text document edit which insert text into file a.txt. An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will cause failure of the operation. How the client recovers from the failure is described by the client capability: workspace.workspaceEdit.failureHandling
    bors committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    2e7e8cc View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15825 - Austaras:master, r=flodiebold

    fix: better resolve assoc item with type bound
    
    Closes rust-lang#15772
    bors committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    8d3522e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9f8191b View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15944 - brunobell:patch-1, r=lnicola

    Update Arch Linux package URL in manual.adoc
    
    The old URL returns 404 now.
    bors committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    91b3148 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#15921 - Young-Flash:tmp, r=Veykril

    chore: add use case for `PathSegment::qualifying_trait`
    
    add use case for `PathSegment::qualifying_trait`, which introduced in rust-lang/rust-analyzer#15875
    bors committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    4513651 View commit details
    Browse the repository at this point in the history
  6. Cancelable Initialization

    This commit provides additional initialization methods to Connection in
    order to support CTRL + C sigterm handling.
    schrieveslaach committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    81c2d35 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Auto merge of rust-lang#15894 - schrieveslaach:cancelable-initializat…

    …ion, r=Veykril
    
    Cancelable Initialization
    
    This commit provides additional initialization methods to Connection in order to support CTRL + C sigterm handling.
    
    In the process of adding LSP to Nushell (see nushell/nushell#10941) this gap has been identified.
    bors committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    7ceefc7 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Relaxation for crate graph mergin

    Partially fixes rust-lang#15656 . When a crate graph is extended which is the case when new workspaces are added to the project
    the rules for deduplication were too strict. One problem that arises from this is that in certain conditions
    when we see the same crate having different `CrateOrigin`s the first form would be maintained. This approach however
    results in some unwanted results such as making renaming forbidden as this has been recently only made available for
    local crates. The given example in rust-lang#15656 can still not be resolved with this PR as that involves taking inconsistencies
    between dependencies into consideration. This will be addressed in a future PR.
    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    886eaa0 View commit details
    Browse the repository at this point in the history
  2. v2

    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    7e4aad5 View commit details
    Browse the repository at this point in the history
  3. v3

    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    25e990d View commit details
    Browse the repository at this point in the history
  4. Update test data for crate deduping

    Make data reflect a case where dev deps are existent.
    base-db::CrateGraph::extend now adds dev dependencies for a crate
    in case of its upgrading from a CrateOrigin::Lib kind of a crate to a
    CrateOrigin::Local one.
    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    74d8fdc View commit details
    Browse the repository at this point in the history
  5. v3

    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    f79e818 View commit details
    Browse the repository at this point in the history
  6. Make test cases simpler

    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    736994f View commit details
    Browse the repository at this point in the history
  7. Precede paths with $ROOT$

    alibektas committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    ba1b080 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#15754 - alibektas:15656/linked_projects_are_l…

    …ocal_too, r=Veykril
    
    fix: Dedup duplicate crates with differing origins in CrateGraph construction
    
    Partially fixes rust-lang#15656 . Until now the condition for deduplication in crate graphs were the strict equality of two crates. One problem that arises from this is that in certain conditions when we see the same crate having different `CrateOrigin`s the first occurrence would be kept. This approach however results in some unwanted results such as making renaming forbidden as this has been recently only made available for local crates. The given example in rust-lang#15656 can still not be resolved with this PR as that involves taking inconsistencies between dependencies into consideration. This will be addressed in a future PR.
    bors committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    cccc7ca View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Configuration menu
    Copy the full SHA
    615abb3 View commit details
    Browse the repository at this point in the history
  2. Update tests

    ahlinc committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    f0adf8c View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#15956 - ahlinc:label-detail, r=lnicola

    Improve completion label details display
    
    This PR improves completion label details display by separating trait and alias info from the `label` LSP field to an additional existing `label_detail` field. Changes look like the following:
    
    ### Before
    
    ![Screenshot from 2023-11-24 12-03-08](https://github.com/rust-lang/rust-analyzer/assets/14666676/74066f0d-f1ac-4e99-8be5-c5141d513d23)
    
    ### After
    
    ![Screenshot from 2023-11-24 12-21-57](https://github.com/rust-lang/rust-analyzer/assets/14666676/45fca112-4612-40a3-81b9-07ff12de0962)
    
    _All existing tests are passed without any changes in test themselves logic._
    bors committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    8733728 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15846 - jprochazk:disable-error-notification,…

    … r=Veykril
    
    editor/code: add option to suppress error notifications
    
    Fixes rust-lang/rust-analyzer#14193
    
    - Added the `rust-analyzer.showRequestFailedErrorNotification` configuration option, which defaults to `true`
    - If `rust-analyzer.showRequestFailedErrorNotification` is set to `true`, the current behavior is preserved.
    - If `rust-analyzer.showRequestFailedErrorNotification` is set to `false`, no error toasts will be displayed for any of the failed requests caused by panics in r-a. This _only_ applies to events that are triggered "implicitly", such as `textDocument/hover`.
    
    To test this, you can manually introduce a panic in one of the language server LSP handlers for non-command events. I added an explicit `panic!()` in the `textDocument/hover` event handler:
    
    #### `rust-analyzer.showRequestFailedErrorNotification` set to `true` (default)
    
    [2023-11-07 17-17-48.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/d0408ab8-79d1-42cf-a4e7-94e99d9783ec)
    
    #### `rust-analyzer.showRequestFailedErrorNotification` set to `false`
    
    [2023-11-07 17-16-49.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/0496d8d0-fb53-4bc6-a279-1a47f412dbdb)
    bors committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    fec3828 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b68f531 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#15960 - dtolnay-contrib:issomeand, r=lnicola

    Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`
    
    Extracted from rust-lang#118253.
    bors committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    34cffbf View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2023

  1. Configuration menu
    Copy the full SHA
    94cea46 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15962 - ahlinc:label-datail2, r=lnicola

    fix: add fallback for completion label details
    
    This PR adds a fallback to a previous implementation in a case when the label detail field isn't supported by LSP client and the support isn't reported by the LSP initialize request. In this case additional info about trait and aliases would be merged into the label field as it was before the rust-lang#15956 PR.
    bors committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    35da60a View commit details
    Browse the repository at this point in the history
  3. Bump ra-ap-rustc_parse_format

    lnicola committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    fa74ac8 View commit details
    Browse the repository at this point in the history
  4. Bump ra-ap-rustc_lexer

    lnicola committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    c01679e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aadeb66 View commit details
    Browse the repository at this point in the history
  6. Bump chalk

    lnicola committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    fc880be View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#15964 - lnicola:bump-deps, r=lnicola

    minor: Bump rustc deps and chalk
    
    This finally upgrades `ra-ap-rustc_parse_format` (even though it's probably a no-op?).
    bors committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    79ec2c5 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2023

  1. Switch to our own salsa fork

    lnicola committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    3ccde00 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15967 - lnicola:salsa-fork, r=lnicola

    internal: Switch to our own `salsa` fork
    
    This gets rid of `syn` 1, among others.
    bors committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    237712f View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Configuration menu
    Copy the full SHA
    0c96252 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d036daa View commit details
    Browse the repository at this point in the history