rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 11:40:57 -0300	[thread overview]
Message-ID: <a961984e-9837-1534-6b23-87eaaed3d9a9@gmail.com> (raw)
In-Reply-To: <fW_Nn96x2phVy1b0wgVr6-xSGl3YXXhw5r-3XmAbDz_vsYWr3OmRu-b8pQnVlf0OcAbXRa9BnJXc_tsqVPijmkQtHTAzoZlbt8Gl-4f423w=@proton.me>

On 7/15/23 05:07, Benno Lossin wrote:
> On 15.07.23 05:33, Martin Rodriguez Reboredo wrote:
>> On 7/14/23 12:55, Benno Lossin wrote:
>>>> Both `core` and `alloc` had their `cfgs` missing in `rust-project.json`,
>>>> to remedy this `generate_rust_analyzer.py` scans the Makefile from
>>>> inside the `rust` directory for them to be added to a dictionary that
>>>> each key corresponds to a crate and each value, to an array of `cfgs`.
>>>>
>>>> Signed-off-by: Martin Rodriguez Reboredo yakoyoku@gmail.com
>>>
>>> When I try this patch *all* configuration options are input into the `cfg`
>>> field of the `core` crate (others are also affected):
>>> ```json
>>>                "cfg": [
>>>                    "CONFIG_RING_BUFFER",
>>>                    "CONFIG_RING_BUFFER=\"y\"",
>>>                    "CONFIG_HAVE_ARCH_SECCOMP_FILTER",
>>>                    "CONFIG_HAVE_ARCH_SECCOMP_FILTER=\"y\"",
>>>                    "CONFIG_KERNEL_GZIP",
>>>                    "CONFIG_KERNEL_GZIP=\"y\"",
>>>                    "CONFIG_CC_HAS_SANCOV_TRACE_PC",
>>>                    "CONFIG_CC_HAS_SANCOV_TRACE_PC=\"y\"",
>>>                    "CONFIG_ARCH_WANT_OPTIMIZE_VMEMMAP",
>>> ```
>>> The snippet would continue on for about 1000 lines.
>>> I think this is wrong and not intended.
>>>
>>> --
>>> Cheers,
>>> Benno
>>>
>>
>> Wait, can you tell me which branch are you on? As it works on
>> `rust-dev` and `rust-next` with `make rust-analyzer`. Also, do you
>> have any other details?
> 
> I tried it on both `rust-dev` and on `rust-next` and on both I have
> this problem. Here is what I executed:
> 
> ```sh
> git checkout $branch
> make clean
> make mrproper
> make menuconfig
> make LLVM=1 rust-analyzer
> ```
> 
> In the `make menuconfig` step I disabled `DEBUG_INFO_BTF` and enabled
> `RUST`.
> 
> 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. 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
```

  reply	other threads:[~2023-07-15 14:41 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 [this message]
2023-07-15 15:10         ` Benno Lossin
2023-07-15 16:13           ` Martin Rodriguez Reboredo
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=a961984e-9837-1534-6b23-87eaaed3d9a9@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).