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 #116847

Closed
wants to merge 195 commits into from
Closed

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Oct 17, 2023

r? @ghost

bors and others added 7 commits October 16, 2023 09:30
Expand Emacs documentation

Emacs 29 is now released, and include an example of enabling clippy.
internal: Create `~/.ssh` before writing deploy key
…=Veykril

String literals diagnose

Continues the work from rust-lang#15744 to add diagnosis errors to Str, ByteStr, and CStr literal kinds.

Also replaces `unescape_char` for `unescape_byte` to use the correct method for Byte literals.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2023

Some changes occurred in src/tools/rust-analyzer

cc @rust-lang/rust-analyzer

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2023

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

@lnicola lnicola changed the title ⬆️ rust-analyzer Subtree update of rust-analyzer Oct 17, 2023
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=lnicola
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_154c82f3-d0ad-4c43-82e7-4a7275c01e56
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=ccdc5e1d606c4afa68c5017ac3e7b9c3e106c44b
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_154c82f3-d0ad-4c43-82e7-4a7275c01e56
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_154c82f3-d0ad-4c43-82e7-4a7275c01e56
GITHUB_TRIGGERING_ACTOR=lnicola
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/116847/merge
GITHUB_WORKFLOW_SHA=ccdc5e1d606c4afa68c5017ac3e7b9c3e106c44b
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
  --> crates/rustc-dependencies/src/lib.rs:14:13
   |
14 |     pub use ::rustc_lexer::*;
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable


error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
  --> crates/rustc-dependencies/src/lib.rs:25:13
   |
25 |     pub use ::rustc_parse_format::*;
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable


error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
  --> crates/rustc-dependencies/src/lib.rs:36:13
   |
36 |     pub use ::rustc_abi::*;
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable


error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
  --> crates/rustc-dependencies/src/lib.rs:47:13
   |
47 |     pub use ::rustc_index::*;
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable

@lnicola
Copy link
Member Author

lnicola commented Oct 17, 2023

CC @HKalbasi

Locally I get:

   --> crates/hir-def/src/data/adt.rs:181:10
    |
181 |     Some(ReprOptions { int, align: max_align, pack: min_pack, flags })
    |          ^^^^^^^^^^^ missing `field_shuffle_seed`

But I'm not sure I'm building it the right way.

@HKalbasi
Copy link
Member

It seems the problem is that default-features are always included when the crate is added by the rustc_private. Is there any way to disable them? To unblocking the sync, we can ignore the CI breakage checking and unconditionally depend on the crates.io version for now.

By the way, what was the previous sync problem and how it got fixed?

@Veykril
Copy link
Member

Veykril commented Oct 18, 2023

CC @HKalbasi

Locally I get:

   --> crates/hir-def/src/data/adt.rs:181:10
    |
181 |     Some(ReprOptions { int, align: max_align, pack: min_pack, flags })
    |          ^^^^^^^^^^^ missing `field_shuffle_seed`

But I'm not sure I'm building it the right way.

That's because with the nightly feature, that field exists (as its type comes from rustc_datastructures), with it disabled it doesn't which is what we currently work with.

@lnicola
Copy link
Member Author

lnicola commented Oct 18, 2023

By the way, what was the previous sync problem and how it got fixed?

error[E0463]: can't find crate for hkalbasi_rustc_ap_rustc_abi

There was rust-lang/rust-analyzer#15691, but I don't know if it's fixed or it just fails earlier now.

@hlopko
Copy link
Contributor

hlopko commented Nov 3, 2023

@Veykril and @HKalbasi, could you please advice how we can move this PR forward? This sync is much needed, and the gap between RA and rust repos is growing larger and larger.

@HKalbasi
Copy link
Member

HKalbasi commented Nov 3, 2023

I opened this zulip stream for discussion on the problem: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Depend.20on.20rustc_private.20crates.20without.20default.20features

If it ends up being unsolvable in a short time, we can disable this and unconditionally depend on the crates.io version to unblock the sync.

@lnicola
Copy link
Member Author

lnicola commented Nov 4, 2023

Closing in favour of #117544.

@lnicola lnicola closed this Nov 4, 2023
@lnicola lnicola deleted the sync-from-ra branch November 4, 2023 10:40
@HKalbasi
Copy link
Member

HKalbasi commented Nov 4, 2023

I made #117544 to just test if using path dependencies works, and it didn't due some problem with Cargo.lock which I don't understand really. I will close that PR.

I will try to go with making the nightly feature additive that was suggested in the zulip thread in the following days.

@lnicola
Copy link
Member Author

lnicola commented Nov 4, 2023

Doesn't 23f9077 need a corresponding lockfile change?

@HKalbasi
Copy link
Member

HKalbasi commented Nov 4, 2023

I updated the lockfile in a2bd911 but it didn't work.

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 2023
…lstrieb

Make the randomize feature of rustc_abi additive

The goal here is to make rust-analyzer able to build with the `rustc_private` versions of the rustc crates it depends on. See rust-lang#116847
@HKalbasi
Copy link
Member

HKalbasi commented Nov 7, 2023

@lnicola Can you please create a new sync PR containing this (rust-lang/rust-analyzer#15849) commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.