-
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
Allow skipping the detection of specific tools in qt.has_tools()
#13524
Conversation
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.
This feels generally useful I think, although I'm not sure whether it's better to take an optional list of wanted tools (defaulting to all of them) or a list of tools to skip.
This has been an annoying problem because we are unconditionally checking for `lrelease` in `qt.has_tools()`, and that program is shipped in Debian/Ubuntu with (f.ex.) qttools5-dev-tools[1], which pulls in the kitchen sink (100+ packages, including GStreamer). This is really annoying when trying to do CI builds of libraries or frameworks like GStreamer that use Qt but will never ship translations. 1. https://packages.debian.org/sid/qttools5-dev-tools
477118e
to
95cdf24
Compare
IME lrelease is the odd-one-out. The others are shipped with the same qtbase development package on all distros. I considered making this just |
in my #13304 PR , I proposed a patch with similar goals, I rather allowed to pass the list of tools to be check rather than opting out tools, this permit extending the tools without (I needed some QML specific tools) without having to require explicit opt-out from the user. |
I don't have a strong preference between the two, maybe @jpakkane can help us decide between this and your commit. |
In either case, the test in this PR is valuable and should be used. |
There's also the possibility of the tools having other names, like
"Odd one out", maybe... but, again on Fedora, the situation is sort of the opposite. The others are, as you say, all in |
That's fine, we are not talking about executable name on disk here, but about the tool's name. |
Yes, which is why I didn't notice for so long. I run Fedora. I noticed this when I tried to setup CI for building an app that uses gstreamer in an Ubuntu docker image. Installing |
when you build Qt yourself in a project, it's a bit annoying to be required to build tools you have no use for
Issue is when you start adding support of other Qt tools, if I add support of qmlcachegen and qmltyperegistrar, this means that every people that are using has_tools will have a regression when updating meson as their code wouldn't blacklist these tools. we could restrict has_tools to only check for the current tools (moc, uic, lrelease) but then we would need another method for the new tools. By opting-in the tools you want to check, we can:
Absolutely |
@chubinou you've convinced me. I'll move the relevant things over to your PR from here (release snippet, test) and review your PR in the next few days. |
you may cherry pick my patch or rewrite it your way if you prefer, my PR may take some time to get merged |
superseded by the linked PR, which is now merged. |
This has been an annoying problem because we are unconditionally checking for
lrelease
inqt.has_tools()
, and that program is shipped in Debian/Ubuntu with (f.ex.) qttools5-dev-tools, which pulls in the kitchen sink (100+ packages, including GStreamer).This is really annoying when trying to do CI builds of libraries or frameworks like GStreamer that use Qt but will never ship translations.