flatpak-builder-tools icon indicating copy to clipboard operation
flatpak-builder-tools copied to clipboard

cargo: Handle excluded paths in workspaces

Open gasinvein opened this issue 2 years ago • 4 comments

Should fix #322

gasinvein avatar Oct 09 '22 16:10 gasinvein

@gasinvein is this still valid since the fixed bug has been closed?

hfiguiere avatar Jun 09 '23 14:06 hfiguiere

Yes, the issue was closed by mistake I believe.

gasinvein avatar Jun 09 '23 15:06 gasinvein

I believe that the main problem in #322 is that the script eagerly loads the manifest of every package in a git source and tries to resolve all of its dependencies, even if we don't need the package in the end.

When we encounter a package, we should always check if it's listed in the Cargo.lock, otherwise we can safely skip it. So I see two options:

  1. Keep the list of packages in Cargo.lock around and check it every time, it would probably be the simplest as it only involves passing a list around
  2. Load the source first, and then resolve only the packages we need lazily, but that might probably involve deeper changes.

Edit: Actually, it seems like #399 would fix #322.

zecakeh avatar Apr 06 '24 09:04 zecakeh

#399 was merged. And other fixes too. Maybe it's worth retrying.

hfiguiere avatar Apr 06 '24 18:04 hfiguiere