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

Document 'meson subprojects update --reset' #28

Open
andy5995 opened this issue Nov 29, 2024 · 5 comments
Open

Document 'meson subprojects update --reset' #28

andy5995 opened this issue Nov 29, 2024 · 5 comments

Comments

@andy5995
Copy link
Contributor

tree-sitter wasn't shown in the output but is on L79 of meson.build.

vs-templ| Project name: vs-templ
vs-templ| Project version: 0.3.1
vs-templ| C++ compiler for the host machine: clang++-19 (clang 19.1.3 "Debian clang version 19.1.3 (2)")
vs-templ| C++ linker for the host machine: clang++-19 ld.bfd 2.43.1
vs-templ| Program pandoc found: NO
vs-templ| Build targets in project: 53
vs-templ| Subproject vs-templ finished.


meson.build:79:18: ERROR: Subproject exists but has no meson.build file.

Removing subprojects/tree-sitter and re-running bun run meson-setup.clang-release fixed the issue.

Looking briefly at the tree-sitter wrap, the problem may be with using the subproject dir as the patch directory. Paradox?

@KaruroChori
Copy link
Owner

KaruroChori commented Nov 29, 2024

Looking briefly at the tree-sitter wrap, the problem may be with using the subproject dir as the patch directory. Paradox?

My understanding is that writing patch_directory = tree-sitter uses ./subprojects/packagefiles/tree-sitter as folder from which meson.build is copied. That is what I understood by reading the docs at least. Is that wrong?

For ref: https://mesonbuild.com/External-Project-module.html#using-wrap-file

I would have assumed meson patches file back after updating its git deps. If not, I think it is an upstream issue.

@andy5995
Copy link
Contributor Author

I believe you are correct. I just looked through the structure of the wrapdb project and it matches what you state.

I opened an issue upstream

@andy5995
Copy link
Contributor Author

andy5995 commented Nov 29, 2024

See mesonbuild/meson#13970 (comment) for the fix.

I'll re-title this issue to suggest documenting it here.

Note I didn't read through the meson docs or the dupe issue to see if there are cases when the reset arg should not be appended.

@andy5995 andy5995 changed the title After running 'meson subprojects update', tree-sitter/meson.build disappears Document 'meson subprojects update --reset' Nov 29, 2024
@KaruroChori
Copy link
Owner

Thanks for figuring this out. To be honest I feels like meson is doing the wrong thing in this case.
If there had been a --patch to be applied both when first install and for each update, I would have considered it consistently annoying.

But the fact updating a git wrap does not apply the patch automatically after the first time makes no sense in my head :/.
Patches are almost always added because the underlying repo would not be able to work with meson, so why would someone not want them applied as a default.

In any case, I will add a note in the build docs.

@andy5995
Copy link
Contributor Author

andy5995 commented Dec 2, 2024

But the fact updating a git wrap does not apply the patch automatically after the first time makes no sense in my head :/. Patches are almost always added because the underlying repo would not be able to work with meson, so why would someone not want them applied as a default.

Confusing to me as well. If the patch is always wiped when updating, that just basically means you always have to use --reset, unless you don't have any subprojects that uses patches.

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