| Age | Commit message (Collapse) | Author |
|
It should be added even if unexpected_cfgs is not part of Cargo.toml.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The default value is not passed further through the converter,
therefore it must take proc-macro into account.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The lints table in Cargo.toml has a very human-targeted syntax. When
building manifest.from_raw, flatten everything into a single list,
prefixing the tool name to every warning option and sorting by priority.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not look anymore at proc_macro after init, keeping crate_type as the
sole source of truth about the desired crate types.
|
|
This allows keeping the manifest unmodified which is better practice for
a parser. Previously some places had e.g. raw.setdefault().
It also fix some values:
- BuildTarget.doc_scrape_examples is removed. It seems to be some
experimental cargo feature, but I haven't found documentation that
says it should be part of the manifest. It was also missing from raw
manifest.
- BuildTarget.edition does not default to 2015, it default to package's
edition, which itself default to 2015.
- bench value defaults to False for tests.
- Dependency.path must be relative to its Cargo.toml location. If the
value comes from the package it can be used as-is, but if it comes
from workspace it must be made relative.
- Library.name default to its package name with dash replaced with
underscores.
|
|
raw.Manifest represents any Cargo.toml file, a package, a workspace, or
both.
However, the Manifest dataclass can only be a package, and the Workspace
dataclass is a workspace with an optional root package.
|
|
When processing cargo subprojects, each Resolver was independently
loading Cargo.lock files, leading to duplicate wraps and errors like
'Multiple wrap files provide dependency'.
Instead, build the cargo.Interpreter as soon as a Cargo.lock file is
found, and merge that Cargo.lock into the wrap resolver. There is no
need anymore to build a separate resolver for the dependent packages,
because their indirect dependencies are all listed in the parent lockfile.
|
|
This avoids cloning the same repo multiple times, instead a single wrap
can provide multiple cargo dependencies.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Make the dataclasses closer to the TypedDicts.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
We'll need to evaluate those expressions before generating the AST.
Instead take a config key-value dictionary and evaluate the expression
to return a boolean.
|
|
Add cfg token to be able to parse the top level cfg() function.
Fix parser which was creating a new iterator when recursing which caused
the caller function's iterator to not have advanced when recursing
function returns.
|
|
Cargo.lock is essentially identical to subprojects/*.wrap files. When a
(sub)project has a Cargo.lock file this allows automatic fallback for
its cargo dependencies.
|
|
The middle 0 was wrongly dropped.
|
|
Keep only the Builder class, there is no point in duplicating
everything.
|
|
This uses a recursive descent parser + lexer to create an IR from cfg()
expressions, which it then converts into meson IR.
|
|
|