1

In Meson, subprojects can be defined using wrap-files. The manual shows an example of a wrap-git file:

[wrap-git]
url = https://github.com/libfoobar/libfoobar.git
revision = head

I've set-up a local test project that sets up a subproject like the example above. All works well and Meson pulls in the subproject's repository, builds it, and links it with the test project executable.

However, when I push a new change to the subproject repository, Meson fails to pull in these changes automatically even though revision = head is specified in the wrap-file. To be clear, I did not really expect this to work.

What does work is manually removing the subproject's source code and then letting Meson reconfigure the project. This clones the subproject repository and thus pulls in updates. But sadly this is a manual action...

My question: when tracking the head revision in a git wrap-file of a subproject, how to pull updates automatically?

Maarten Bamelis
  • 2,243
  • 19
  • 32

1 Answers1

2

This is expected behavior. As per reference doc:

Once a subproject has been fetched, Meson will not update it automatically. For example if the wrap file tracks a git branch, it won't pull latest commits.

To pull latest version of all your subprojects at once, just run the command:

$ meson subprojects update

If only selected are needed, add names after command:

$ meson subprojects update libfoo libbar

(this is in short, more details in the link)

pmod
  • 10,450
  • 1
  • 37
  • 50