From: adrian.freihofer@gmail.com
To: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] vscode: improve settings for new yocto plugin
Date: Mon, 12 Feb 2024 16:48:41 +0100 [thread overview]
Message-ID: <8ed89336017da50392be926a152a10901c8ceea7.camel@gmail.com> (raw)
In-Reply-To: <5acae196-d10c-42e3-b201-e4acc61e55c5@savoirfairelinux.com>
Hi Enguerrand
>
> The extension's users have wildly varying setups for running bitbake.
> They have divers sources and build directories layouts. They can open
> each layer in a VSCode workspace separately, while other open a
> parent
> directory with everything in it. Some users will use wrapper scripts
> like kas, or custom crops docker containers. There is currently no
> initiative to automatically provide initial configurations for the
> extension for these reasons.
But all users who have the build folder in the scope of VSCode have the
same need for a settings.json that prevents VSCode from indexing the
build folder and configures the yocto-bitbake plugin correctly.
>
> I'm not sure to understand the application of the poky/.vscode
> configuration now. I used to see it as a way to quickly demo the
> VSCode
> functionalities for poky developers or beginners who have just the
> poky
> layer. The new patch which updated poky/.vscode was properly doing
> that
> IMO. A new user who downloads poky to get started with Yocto will
> directly get a .vscode to play around with the various machines and
> recipes in poky.
Since the plugin changes the settings.json file, the settings.json file
cannot be in Git. The problem starts at the latest when working with
git. git and VSCode fight against each other in a very problematic way.
I was not able to solve this while the plugin was still active.
>
> The majority of users who are using multiple layers and all the
> various
> configurations I mentioned will have to configure their own .vscode
> but
> I don't think they will be mislead into using poky's example
> configuration.
The quick start guide from
https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#building-your-image
recommends
git clone git://git.yoctoproject.org/poky
cd poky
source oe-init-build-env
I think just starting code like "code ." from poky or "code .." from
the build folder is the next logical step which should just work. The
Yocto/OE reference setup should also be the reference setup for the
Yocto-bitbake plugin.
> From the user feedback we've had with the extension, I've
> never heard of users opening poky as their workspace, since most of
> them should not be editing poky in the first place.
All users who work on poky itself need to modify poky. I think
developing Yocto/OE is a viable use case for Yocto/OE.
But also all the other uses cases I'm aware of use one VSCode instance
to edit or browse all the layers in a very similar way like the quick
start suggest that.
Anyway, having the settings.json in git does no longer work. Otherwise
working with git in a layer directory is impossible.
But leaving the user without any kind of configuration leads to a user
experience like this:
git clone git://git.yoctoproject.org/poky
cd poky
source oe-init-build-env
bitbake core-image-minimal
cd ..
code .
- VSCode starts indexing the build folder at full CPU speed until an
OOM occurs.
- The default configuration uses the wrong build folder and other
invalid settings. The plugin is not usable without configuring many
details.
With my patches all the issues would be addressed. The plugin just
starts showing its real potential with the default configuration.
It also works for more complicated setups. I'm using it for example
with these lines in a oe-init-build-env from a custom layer:
...
if command -v code > /dev/null; then
OEINITDIR=$(dirname "$THIS_SCRIPT")
OEINITDIR=$(readlink -f "$OEINITDIR")
OEINITDIR="$OEINITDIR" \
VSCODE_EXCLUDE_DIRS="**/a-big-folder/**" \
"$OEROOT"/scripts/contrib/oe-init-build-vscode.py || {
unset OEROOT
return 1
}
fi
...
Thank you and best regards,
Adrian
> >
> > Here are some patches:
> > https://git.yoctoproject.org/poky-contrib/log/?h=adrianf/vscode-yocto-plugin
> >
> > I will send them as V2 after I have tested them some more. (There
> > are
> > already oe-selftest)
> >
> > @Enguerrand your review would be appreciated.
> >
> > Regards,
> > Adrian
> >
> > > Cheers,
> > >
> > > Richard
> >
>
> Thanks!
> Enguerrand de Ribaucourt
next prev parent reply other threads:[~2024-02-12 15:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 20:30 [PATCH] vscode: improve settings for new yocto plugin Adrian Freihofer
2024-02-09 23:43 ` [OE-core] " Richard Purdie
2024-02-10 13:42 ` adrian.freihofer
2024-02-11 15:24 ` adrian.freihofer
2024-02-12 9:42 ` Enguerrand de Ribaucourt
2024-02-12 15:48 ` adrian.freihofer [this message]
2024-02-12 16:58 ` Enguerrand de Ribaucourt
2024-02-12 22:43 ` adrian.freihofer
2024-02-13 9:22 ` Enguerrand de Ribaucourt
2024-02-13 14:53 ` Peter Kjellerstedt
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=8ed89336017da50392be926a152a10901c8ceea7.camel@gmail.com \
--to=adrian.freihofer@gmail.com \
--cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
--cc=openembedded-core@lists.openembedded.org \
/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