[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Usage of ContainerCommandLauncherFactory(2)::verifyIncludePaths and ..::verifyLanguageSettingEntries
|
- From: Moritz Strübe <moritz.struebe@xxxxxxxxxx>
- Date: Tue, 3 Nov 2020 20:23:08 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mathema.de; dmarc=pass action=none header.from=mathema.de; dkim=pass header.d=mathema.de; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sYSl9RKzXwj1dfUay3pGaM6JDFuGVa0ApG79ruOmWXE=; b=WOOf2jD4LfoEBHH4fkmqh103dmjZTUYN0aAGnlyd/vMDoWlfHE6B6u7IFD8C4frOIX0vNgc6otmh4Ag/7PVKidVpY6FHUj1+PhAo2/AmcLmoTSUJ1JY/1tyzktswXaXg5XwqV91EmrxdxxASwkPt6RBFGZwS8XKNXcSGdGGLIMh4hJeuSeVBWEHfqcwzVwiRlyCCZ/rmtBTFKH2WH33y65/xJ3MijTYQZJ8lrujQmZpM2MMTYzxLRiq6l+UNUBt9kEGnlv0yVdWeDiujAdepsd80Nh1v/z2+gb6NS8/PE4IomCwcuCBf+eQQ9511MSnG3cJFooRR61Weg0XXhobw8A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEUy/TZpTybPbqO8pRX9jee+RUaqmsYNxe75OJhvT8ayOo9VZNE429PwEOZmQF+nJ15o9rs6dnA+/1scz/TmQYbg2sRpKWu+l8dxppxq/N8qdZ1q+QyBxU6CNdHfDZNLVpkWRyGM2qqh2Na5CH8KfdyEgrxGRokwIdJ9S70mzh4Ri4OW6orLJEzksoQW9f0e7yeCNpBAENKrlI6YBfOb62/P/c6utZgpAXvWSrfUudOLHtK6JlijWagKVcNlFqAPcwJNgTjKsYZ/6SI4KBptF8Ou1Z2bfjFZekycU2HWY8D9Tl3+tvPSqQKzEAAGrrzk473ARV2QtAL+wb72FvubtQ==
- Delivered-to: cdt-dev@xxxxxxxxxxx
- List-archive: <https://www.eclipse.org/mailman/private/cdt-dev>
- List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
- List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
- List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
- User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0
Hey.
Am 03.11.2020 um 20:06 schrieb Jeff
Johnston:
> There is also a UI page
> where a user can delete the cached headers for an image
and thus force
> a recopy if they have some complicated scenario where
they
> are changing the headers manually via a shell session.
Ok. Where is that? This stuff needs more documentation or
maybe the
documentation should be placed more visible. :-) I'm
planning to do some
once I got all the features I need implemented.
See
org.eclipse.cdt.internal.flatpak.launcher.ui.preferences.FlatpakHeaderPreferencePage.java
Ok. But there is none for Docker. That explains it. :)
>
> When the new CBuild model was added, the old methods
for
> ICommandLauncherFactory do not get called in the build
sequence. Thus,
> ICommandLauncherFactory2 was added to deal with CBuild
projects and
> the verifyIncludePaths() was added that does both
copying and
> massaging in a
> single call. Again, we are supporting Containers so
the image headers
> are expected to be static.
Ok, but verifyIncludePaths is only called by providers, not
when the
project is loaded, right?
Background: As long as I don't touch my workspace,
everything is fine.
Yet if delete the .../HEADERS/ folder to trigger copying the
files,
things break.
The checkIfIncludesChanged call is expecting that you
removed the headers via the UI instead of
manually (i.e. looking at a remove list). It can be
modified to check for the folders being manually removed as
well.
>
> For Flatpak, the scenario changed yet again. Initially
CDT wasn't
> working properly with Flatpak as it only had a subset
of tools/headers
> installed. I modified Flatpak CDT so
> it uses local tools and local headers, leaving it up to
the end-user
> as is done for regular CDT. The local headers are
copied
> into a cache that the flatpak can access in the sandbox
much like we
> do for Docker Images. If the headers change, the user
may have to do
> a manual remove of the headers
> and allow the system to recopy as needed. A new
interface:
> IContainerCommandLauncherFactory3 was added which adds
the
> checkIfIncludesChanged()
> method to see if header files have been removed since
the last copy.
> The Flatpak change is very recent and hasn't been
thoroughly
> tested/exercised in the wild. There
> was a bug in Flatpak which didn't allow a Docker
Connection to work
> (can't access the unix socket) and I haven't looked at
Flatpak CDT
> since I reported that issue as Mat
> was on vacation at the time and Flatpak wasn't being
updated.
So, if I implement checkIfIncludesChanged (checking whether
the
docker-image still has the same ID and all necessary include
folders are
available) and return false, this should trigger
verifyIncludePaths?
Other way round. If you return true, then needRefresh
will be set to true in
CBuildConfiguration.startBuildProcess() and the headers
should be refreshed when processing
the build output as the scanner info will be refreshed.
Yes. Other way round makes sense.... :) Ok. Then I'll implement a
quick check whether the docker-image changed and whether all
includes exist. That should fix things automagically after the next
build.
If there is a scenario where indexing is needed without
a build, then additional
logic may be needed elsewhere.
Ok. Then I'll leave it at that for the time being. There are more
important things to look into, once I got this running - like
automatically pulling images, if they don't exist locally. :)
Thanks!
Morty
--
MATHEMA Software GmbH
Schillerstraße 14 | 90409 Nürnberg
Telefon: +49 (0)911 180778-50
E-Mail: moritz.struebe@xxxxxxxxxx | Web: www.mathema.de
Geschäftsführer: Andreas Hanke, Thomas Haug
Handelsregister: HR B 35517, Nürnberg/Bayern