-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
If invalid value given to clone-recursive, raise exception #13839
base: master
Are you sure you want to change the base?
Conversation
@@ -310,7 +310,7 @@ files get exported. | |||
To enable this, the following needs to be added to the `.wrap` file: | |||
|
|||
```ini | |||
clone-recursive=true | |||
clone-recursive = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, I added a space on both sides of the = sign (to match the examples on the wrap manual page).
29710ea
to
24e1ede
Compare
@@ -600,6 +600,9 @@ def _get_git(self, packagename: str) -> None: | |||
if self.wrap.values.get('depth', '') != '': | |||
is_shallow = True | |||
depth_option = ['--depth', self.wrap.values.get('depth')] | |||
clone_recursive_val = self.wrap.values.get('clone-recursive', '').lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placing this earlier in the function is an improvement. Now if there's an invalid value in the wrap file, meson will error out sooner. When the value is corrected, meson will clone the repository and the submodules.
Previously, after a failed attempt, meson would make no attempt to clone the submodules even after the value was corrected in the wrap file.
There is still a parser error if no value is provided to clone-recursive, which is the desired behavior. An exception will be raised if a value is given other than 'true' or 'false'. If 'clone-recursive' is not included in the wrap file at all, 'false' will be assumed.
Fixes mesonbuild#13821 but perhaps a separate ticket should be opened for a related bug, or maybe some extra docs are needed. Note in the ticket I mentioned three things I had to do to get it working as expected after the failures.
Fixes #13821 but perhaps a separate ticket should be opened for a related bug, or maybe some extra docs are needed. Note in the ticket I mentioned three things I had to do to get it working as expected after the failures.