From: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
To: Benno Lossin <benno.lossin@proton.me>
Cc: rust-for-linux@vger.kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Tom Rix" <trix@redhat.com>
Subject: Re: [PATCH v2] scripts: read cfgs from Makefile for rust-analyzer
Date: Sat, 15 Jul 2023 13:13:14 -0300 [thread overview]
Message-ID: <0f7645a2-a4dd-6e5c-25fd-4543f7c4bd13@gmail.com> (raw)
In-Reply-To: <UNNYZPvSjkF1LFhX3VpAPSscY-z09oyuMXMW5f43bXBI0GeOYpcVk79sC9dFS12mNMtRZIYPwa6txmDAa4ewPmJb8SaaWrMnvYvaYJ-IeqA=@proton.me>
On 7/15/23 12:10, Benno Lossin wrote:
> On 15.07.23 16:40, Martin Rodriguez Reboredo wrote:
>>> If you want, I can upload the `rust-project.json` file to GH, since
>>> it is 55k lines long.
>>>
>>
>> I'm thinking that you may be looking at the wrong side.
>
> Seems so, I looked at `bindings` and `kernel`, but got confused by deps.
> I also verified that without your patch all of those configs are present.
>
> Still I find it a bit confusing that all of these configs are present
> there. How does rust-analyzer use those?
`rust-analyzer` sees those configs so when you type code it'll show you
suggestions based upon them in your IDE. For example, if you have
`CONFIG_NET` enabled then when you type "kernel::net::" your IDE will
suggest you completions from that module, otherwise it will not.
> Also sorry for the noise.
No problem, you'll easily get confused if you look upon that massive file.
Happened to me.
>> So, can you show me the output of these `jq` commands?
>>
>> ```sh
>> jq '.crates[] | select(.display_name == "core")' rust-project.json
>> jq '.crates[] | select(.display_name == "alloc")' rust-project.json
>> ```
>
> [...]
Output looks as it was expected, so if in your IDE you go to the
definition of a function or type from either `core` or `alloc` then it's
going to show you the correct result, otherwise it might get confused or
throw you an error.
next prev parent reply other threads:[~2023-07-15 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-20 23:17 [PATCH v2] scripts: read cfgs from Makefile for rust-analyzer Martin Rodriguez Reboredo
2023-07-03 14:24 ` Martin Rodriguez Reboredo
2023-07-14 15:55 ` Benno Lossin
2023-07-15 3:33 ` Martin Rodriguez Reboredo
2023-07-15 8:07 ` Benno Lossin
2023-07-15 14:40 ` Martin Rodriguez Reboredo
2023-07-15 15:10 ` Benno Lossin
2023-07-15 16:13 ` Martin Rodriguez Reboredo [this message]
2023-08-02 17:42 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f7645a2-a4dd-6e5c-25fd-4543f7c4bd13@gmail.com \
--to=yakoyoku@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=trix@redhat.com \
--cc=wedsonaf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).