Age | Commit message (Collapse) | Author | Files | Lines |
|
In commit f291b637b13ba32e20d1081906e68780d2a5ae5a the tools were moved
around but a comment got forgotten. Now, in order to be meaningful and
remind us of anything, it needs to be in a different location.
|
|
Although Qt6 has decided these are "internal" commands and should never
be run directly, so they don't get symlinked to /usr/bin at all, and are
only available in the qt_dep.bindir anyway.
But, the general naming pattern should be followed on principle.
|
|
Qt 6.1 moved the location of some binaries from QT_HOST_BINS to
QT_HOST_LIBEXECS as noted in the changelog:
c515ee178f Move build tools to libexec instead of the bin dir
- Tools that are called by the build system and are unlikely to be
called by the user are now installed to the libexec directory.
https://code.qt.io/cgit/qt/qtreleasenotes.git/tree/qt/6.1.0/release-note.txt
It's possible to help the 'qt' module find the tools by adding Qt's
libexec directory to the PATH environment variable, but this manual
workaround is not ideal.
To compensate, meson now needs to look for moc, rcc, uic, etc. in
QT_HOST_LIBEXECS as well as QT_HOST_BINS.
Co-authored-by: Stefan Hajnoczi <stefanha@jammr.net>
|
|
These are only used for type checking, so don't bother importing them at
runtime.
Generally add future annotations at the same time, to make sure that
existing uses of these imports don't need to be quoted.
|
|
|
|
Using future annotations, type annotations become strings at runtime and
don't impact performance. This is not possible to do with T.cast though,
because it is a function argument instead of an annotation.
Quote the type argument everywhere in order to have the same effect as
future annotations. This also allows linters to better detect in some
cases that a given import is typing-only.
|
|
Because we don't want to pass the Interpreter kwargs into the build
layer. This turned out to be a mega commit, as there's really on elegant
way to make this change in an incremental way. On the nice side, mypy
made this change super easy, as nearly all of the calls to
`CustomTarget` are fully type checked!
It also turns out that we're not handling install_tags in custom_target
correctly, since we're not converting the boolean values into Optional
values!
|
|
Originally name should have been set to required=True, but since then
the requirement to name CustomTargets (which compile_resources is a
wrapper around) has been dropped. As such we just need to allow the
default value of None through.
Fixes: #9698
|
|
As evidenced by the warning message immediately below this, I meant to
write "5.15" here. As is, this will enable depfile support on too-old
versions of moc.
|
|
|
|
We currently enable this only for rcc (where this really really matters)
but it can often matter for moc as well, and is just generally more
correct.
Really, this should have been added in #7451 too, but I neglected it
since the module warned about inaccurate dependencies only for rcc...
|
|
|
|
|
|
This does not convert the build side, or remove any of the checking it
does. We still need that for other callers of custom target. What we'll
do for those is add an internal interface that defaults things, then
we'll be able to have those callers do their own validation, and the
CustomTarget validation machinary can be removed.
Fixes #9096
|
|
I ran into one of these from LGTM, and it would be nice if pylint could
warn me as part of my local development process instead of waiting for
the CI to tell me.
|
|
|
|
In commit 3c4c7d042932c23a8ea24d85f24cd290d0a5ea13 the qresource
variable stopped being overwritten with a mesonlib.File, which is
reasonable. However, one call site for it which relied on being a built
file did not get renamed when needed.
Make the build target use the built file.
|
|
Regression in commit d7ac2f10655433989e5e17867b6c8ef428fd39e8 since
self.{tool_name} is not how it used to be tracked, and the "found"
dictionary is a legacy of the old location.
|
|
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
|
|
|
|
|
|
|
|
|
|
Fixes: #7007.
|
|
This works for `moc_*` and `ui_files`, but it never could have worked
for `qresources` due to the implementation assuming a `str` or `File`.
To restore previous compatibility I've added `CustomTarget` where it
would have worked, but not where it would have failed, the former would
raised an exception along the lines anyway.
Fixes #9007
|
|
`qt.preprocess` dispatches to the individual methods instead of
duplicating all of the logic itself, but this means that it goes through
the type checking, and feature checking a second time. To avoid this we
need to use a private helper method instead.
Fixes #8920
|
|
|
|
Because that's what we need, of course
|
|
This should have been supported before, but wasn't.
|
|
|
|
This really shouldn't be necissary, but fixing the typing annotations of
ModuleReturnValue is much harder than just returning the Holder
directly.
|
|
|
|
It's really a property of the Generator what name to use, not something
that should be passed to each call to process files.
|
|
For qt we already have all of the necissary checking in place. Now in
the interpreter we have the same, the intrperter does all of the
checking, then passed the arguments to the Generator initializer, which
just assigns the passed values. This is nice, neat, and clean and fixes
the layering violatino between build and interpreter.
|
|
This requires that the interpreter has done the validation, which it now
does at all callsites. This simplifies the Generator initializer.
|
|
|
|
This just ignores the fact taht Generator is unchecked. Generator needs
some real love in terms of type checking.
|
|
|
|
|
|
|
|
This adds a number of missing type annotations to existing functions,
and makes a few members protected instead of public, as they were never
meant to be public
|
|
for ode sharing and simplicity
|
|
This method only compiles moc resources, nothing else
|
|
for code deduplication
|
|
Which is the same functionality split out of preprocess
|
|
Which removes code duplication and makes our testing better
|
|
This is a separate method for just handling qrc resources.
|
|
|
|
It's confusing, and it's a duplicate of the `sources` keyword argument,
which has always existed.
|
|
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
|