Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson dist not ignoring git metadata for subprojects. #14005

Open
KaruroChori opened this issue Dec 14, 2024 · 2 comments
Open

meson dist not ignoring git metadata for subprojects. #14005

KaruroChori opened this issue Dec 14, 2024 · 2 comments

Comments

@KaruroChori
Copy link

Describe the bug
In the docs it is said that git metadata are stripped, but using --include-subprojects will copy subprojects with their git intact, which adds a significant weight in the final distribution.

To Reproduce
For example, check https://github.com/KaruroChori/vs-fltk/releases/tag/v0.1.1-alpha . The distributed file vs-fltk-0.1.1-alpha.tar.xz has git folder for its suprojectes.

Expected behavior
Git metadata should be stripped, or a flag should govern their presence.

system parameters
Using meson 1.6, the exact command is meson dist -C build/ --allow-dirty --no-tests --include-subprojects from the workflow here

@KaruroChori KaruroChori changed the title meson dist not ignoring git metadata for subjprojects. meson dist not ignoring git metadata for subprojects. Dec 14, 2024
@AHSauge
Copy link
Contributor

AHSauge commented Dec 16, 2024

I got a bit curious about this, and after a quick investigation, it seems this happens for any subproject that's fetched with git, and where the meson.build file is patched in due the project being non-meson. So with that in mind, the warning this produces (not sure if that's been added recently), namely WARNING: Source tree looks like it may be a git repo, but git returned a failure. meson.build may not have been committed to git?, is rather accurate. meson.build is indeed not committed to the git repo for the submodule, but is found in the root project under subprojects/packagefiles/foobar

Note that there might be more corner cases. This is just the first one observed.

For context, this occurs because is_git in mdist.py returns false. If someone can provide guidance on what the desired behaviour is here, I'm willing to make a fix. I assume there's a reason this function can return false for a .git folder, implying this isn't as simple as removing the checks.

@KaruroChori
Copy link
Author

KaruroChori commented Dec 17, 2024

Thank you for investigating the source of this problem :).
Sadly this is not the first rough edge I encountered with patches over git.
For example (totally unrelated) updating subprojects via wrap will not apply patcher again unless an obscure flag is set, which makes no sense :/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants