| Age | Commit message (Collapse) | Author |
|
cmd_line.txt is not related to serialized data, in fact it's a fallback
for when serialized data cannot be used and is also related to setting
up argparse for command line parsing. Since there is no code in common
with the rest of coredata, move it to a new module.
Fixes: #15081
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Optional[str]]
As a side effect, this deduplicates -D and -U arguments passed
to meson configure, taking into account the relative ordering
of -D and -U options.
Fixes: #14754
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Those were hidden, because the global options look at
subproject `None` rather than `''`.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
To the user, toplevel project options are the same as global options
because they are not prefixed by ":". So, even if we starting printing
toplevel project overrides, we want to keep project options outside of
that section. Then one would end up with:
...
Project options
---------------
Main project:
Subproject foo:
The "Main project" line is printed because '' is in self.all_subprojects,
but there is nothing below because project options have been printed before.
To fix this, print section names lazily, together with their first content
item.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: #14476
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Prepare to reuse the logic in "meson setup --reconfigure".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This was the pre-refactoring implementation of `-D`, which is now unused.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
Added by the optionrefactor changes, but not used
|
|
This also makes KeyedOptionDictType obsolete and it's removed
|
|
|
|
The fact that UserOption is generic is really an implementation detail,
not something to be used publicly. So by having an `AnyOptionType`
alias, we can get better type checking, as can be seen by the patch as a
whole. One of the big fixes it replace open-coded equivlalents of
`MutableKeydOptionDictType` with that type alias.
|
|
This will allow us to take choices out of the UserOption class, which
doesn't actually use this attribute.
|
|
These errors can make reading comments and documentation
unnecessarily confusing for users and contributors who
do not speak English as their first language.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes issues where a new option is added, an option is removed, the
constraints of an option are changed, an option file is added where one
didn't previously exist, an option file is deleted, or it is renamed
between meson_options.txt and meson.options
There is one case that is known to not work, but it's probably a less
common case, which is setting options for an unconfigured subproject.
We could probably make that work in some cases, but I don't think it
makes sense to download a wrap during meson configure.
|
|
These are much easier to handle as one commit since msetup calls mconf
internally. This has found one case where things are being carefully
crafted to work in mconf even though msetup has slightly different
options
|
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
line argument code
|
|
`meson setup -Dfoo=bar builddir` command was returning success ignoring
new option values.
This now also update options. It is useful because it means
`meson setup -Dfoo=bar builddir && ninja -C builddir` works regardless
whether builddir already exists or not, and when done in a script,
changing options in the script will automatically trigger a reconfigure
if needed. This was already possible by always passing --reconfigure
argument, but that triggers a reconfigure even when options did not
change.
|
|
This detects cases where module A imports a function from B, and C
imports that same function from A instead of B. It's not part of the API
contract of A, and causes innocent refactoring to break things.
|
|
|
|
|
|
Setting options or clearing cache is also an error without a valid build
directory.
|
|
This is a pretty common pattern in python (the standard library uses it
a ton): A class is created, with a single private instance in the
module, and then it's methods are exposed as public API. This removes
the need for the global statement, and is generally a little easier to
reason about thanks to encapsulation.
|
|
Exclude coredata from build.dat because it gets pickled separately
already.
|
|
This was added in f774609 to only change the access time of the
coredata file if the coredata struct actually changed. However,
this doesn't work as pickle serializations aren't guaranteed to
be stable. Instead, let's manually check if options have changed
values and skip the save if they haven't changed.
We also extend the associated unit test to cover all the option
types and to ensure that configure does get executed if one of the
options changes value.
|
|
When project is configured with -Dauto_features=disabled, meson
configure should not print "auto" value but "disabled" instead.
|
|
|
|
|
|
Fixes: #10845
|
|
|
|
|
|
|
|
We already use textwrap.wrap() for that and it will correctly split on
spaces.
|
|
|
|
It is useful to redirect some outputs, such as "meson configure" to a
pager (e.h. less). This is similar to most git commands.
|