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

make meson not download things #6667

Merged

Conversation

barcharcraz
Copy link
Member

by default meson will fallback to it's "wrap" system to download dependencies. It's a good idea for packagers to disable that (this may break ports, but afaict very few ports actually use meson)

@MVoz
Copy link
Contributor

MVoz commented May 29, 2019

I do not think that this should be set globally
enough to specify in the port file

--wrap-mode=nodownload or nofallback

as well as parameter --backend ninja need to be removed

https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-0.40.0.md

There is now a VS2017 backend (--backend=vs2017) as well as a generic VS backend (--backend=vs) that autodetects the currently active VS version.

Added a new option wrap-mode that can be toggled to prevent Meson from downloading dependency projects. Attempting to do so will cause an error. This is useful for distro packagers and other cases where you must explicitly enforce that nothing is downloaded from the net during configuration or build.

@grdowns
Copy link
Contributor

grdowns commented May 31, 2019

@voskrese Thanks for making those points!

As a general rule, we would prefer not to require the user to make additional downloads after the port has been downloaded, that way the configuration step of the build can be completed without any internet connection. If we can find an exception to this rule in the future, we can make a special case for wrap-mode by rewriting the line in question to prepend wrap-mode, allowing the option to be overwritten from within portfile.cmake due to option ordering preferring those that come last. In the case that we find a port that does require downloading an additional dependency, we can write another port to add the dependency in question. As it stands, this PR does not cause any regressions, meaning that we do not have any instances of the problem arising.

As for the backend option, meson uses ninja as the default backend, so removing it would allow us to preserve the current behavior while adding flexibility by specifying it within the portfile.cmake. On the same token, because ninja is the default backend, we will also see no functional difference from removing it here unless we override the default elsewhere. As it would be preferred to avoid scope creep on this pull request, I would be happy to see a dedicated discussion in another PR about this topic along with a meaningful use of overriding the default behavior.

Thanks again for the feedback, and thanks @barcharcraz for the contribution!

@grdowns grdowns merged commit 7340d6a into microsoft:master May 31, 2019
@MVoz
Copy link
Contributor

MVoz commented May 31, 2019

you made a new "crutch", now you need to look for workarounds to compile
https://gitlab.gnome.org/GNOME/glib/blob/master/subprojects/proxy-libintl.wrap
proxy-libintl conflicting with gettext

but overall it's your business

ну и на счет --backend=vs
msbuild дает больше возможностей и гибкости в среде windows , даже с интеграцией c vkpkg ninja не сравнима

не так уж много портов на meson, их два или три, и у всех прописан backend

ставить ограничения имхо, это плохо
но как я уже упомянул. это ваше дело

Well, to the account --backend = vs
msbuild provides more features and flexibility in the windows environment, even with the integration of c vkpkg ninja is not comparable

there are not too many ports on meson, there are two or three of them, and everyone has a backend

put restrictions imho that's bad
but as I mentioned. it's your business

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

Successfully merging this pull request may close these issues.

None yet

3 participants