Commit Graph

133 Commits

Author SHA1 Message Date
Giacomo Vercesi 2f0f320711 revng2 project init: fix for non-local providers
Fix the `revng2 project init` command to work with all
`StorageProvider`s, not just the local one. It still specializes for the
local one to allow creating the model file.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 41ad874013 StorageProviderFactory: add lock_type parameter
Add the `lock_type` parameter to `StorageProviderFactory`, this allows
signaling what operations are going to be done while using the provider.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi edab3e26e9 ProjectMetadata: add additional fields
Expand the `ProjectMetadata` dataclass to include additional timestamps
and the hash of the pipeline description. Change all the
`StorageProvider`s so that all the new data is saved and returned.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi a68c53cbb0 pypeline.cli: drop PypeGroup
The `PypeGroup` click group did not provide any real benefit:
* It added extra help about pipebox arguments, but text that was not
  correct from where the help was coming from (the group does not parse
  the arguments). The subcommands still reports it though.
* It forbid using non-PypeGroup and non-PypeCommand commands in the
  command tree, but in the long run this is desirable so it should be
  dropped
For these reasons it has been dropped.
2026-05-22 09:04:35 +02:00
Alessandro Di Federico 723e4ead76 export sqlite: ignore symbols without a prototype 2026-05-15 11:43:11 +02:00
Alessandro Di Federico 3f68528866 sqlite export: add Functions having ExportedName
A library's exported functions live in model::Function. Walk the
Functions list and insert one Symbol row per ExportedName so the
database covers both shapes.

Also, batch all symbol inserts.
2026-05-15 11:27:33 +02:00
Alessandro Di Federico 694bad5bfa model export sqlite: save full library path 2026-05-15 11:27:33 +02:00
Alessandro Di Federico 51323c4707 Introduce revng model export sqlite
This tool exports into a SQLite DB the prototypes of the functions in a
given model, along with the closure of its type dependencies.
2026-04-23 13:40:43 +02:00
Alessandro Di Federico 0385e4c652 Introduce revng::Configuration 2026-04-23 13:40:43 +02:00
Alessandro Di Federico 5b43a23060 BinaryIdentifier: s/.Name/.CanonicalPath/g 2026-04-23 13:40:42 +02:00
Alessandro Di Federico 8bf4923b27 revng fetch debug-info: use lowercase PDB ID 2026-04-23 13:40:42 +02:00
Giacomo Vercesi 0a18cb94f5 Cleanup revng.support.artifacts
Remove a few `Artifact` classes from `revng.support.artifact`. These
were needed to handle the idiosyncrasies of the legacy pipeline. Some of
the logic has been reworked into the ptml code.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 3a5dc835de revng.project: port to pypeline
Convert `revng.project` to use the `revng2` command-line and the `revng
project daemon` server instead of the legacy ones.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 18e3501731 pypeline: implement proper config parsing
Overhaul the pipeline configuration logic by collapsing all dynamic
configuration options, both for analyses and pipes into a single
dictionary. Change all the interfaces so that there is no longer
distinction between the configuration of an analysis and of pipes.
Expose these options to the command line via `--{name}-configuration`
options for each pipe/analysis that is applicable to the command-line
invocation.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi ee7ce2d9a3 revng2 quick artifact: use subcommands
Make each artifact a subcommand of `revng2 quick artifact` so that it
behaves the same way as `revng2 project artifact`.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 20059b5f3a pypeline: make Container.serialize selective
Change the `Container.serialize` interface so that it is possible to
supply a list of objects that will be serialized instead of all the ones
in the container.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi 4c6436f7b2 pypeline: introduce artifact category
Add categories in the pipeline, allow an artifact to have a category
specified which allows it to be shown or hidden by default. Adapt the
CLI tools to hide artifacts of the category that don't
`show_by_default=True`.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi 773245b893 pypeline/cli: use dataclass for ctx.obj
Add typing to the `ctx.obj` object used to store pypeline-specific data
while parsing the command-line in click.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi d0d3df4f72 Add revng2 quick analyze
Add the counterpart to `revng2 quick artifact` which allows to run the
initial auto analysis on a binary and return its model.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 161ba6e5c3 revng2 quick artifact: add --analyses option
Add the `--analyses` option which allows specifying the list of analyses
to be run before producing the artifact instead of the default initial
auto analysis.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi ce60d8a1e5 pypeline: integrate model migration infrastructure
When calling `Model.deserialize` the model will be automatically be
migrated if it needs to.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi a6a3e15e6b pypeline: add env prefixes
Add the `PYPELINE_` prefix to all the pypeline environment variables.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 9287c51d27 pypeline: fix -C option
Instead of executing `chdir` when using the `-C` option, which is
fragile when other paths are involved, store the option in the click
context and propagate it to the required code paths that require knowing
what the base directory is.
2026-03-04 14:58:02 +01:00
Giacomo Vercesi a94c6a2636 pipebox: use native runners
When running in debug mode, use the native runners where possible.
2026-02-16 10:34:38 +01:00
Giacomo Vercesi 6b40322a3c revng2: implement wrappers
Implement wrappers in the `revng2` CLI, this allows running command with
e.g. `--gdb` to allow debugging.
2026-02-16 10:34:38 +01:00
Giacomo Vercesi d7e605fe63 pypeline: add debug mode
Add the functionality the the pipeline infrastructure and CLI to run
individual pipe and analyses as subcommands instead of in-process. This
allow better debuggability of individual pipes.
2026-01-29 15:00:12 +01:00
Giacomo Vercesi 1b732501ae revng2 quick: swap artifact and binary args 2026-01-29 14:54:24 +01:00
Giacomo Vercesi 9d8845de95 revng2: do not print stacktrace on SIGINT 2026-01-29 14:54:06 +01:00
Giacomo Vercesi 265af3768f Binary importers: fix debug info detection
Fix the behavior of binary importers by propagating the path of the
input binary from revng2 downwards, allowing finding `.debug` files in
the correct paths.
2025-12-19 10:28:29 +01:00
Giacomo Vercesi 94b9ecad6c mass-testing: exclude paths from flamegraph
Add a new option to the mass-testing `meta.yml` that allows skipping
some paths when generating the flamegraph. In the case of revng this
allows skipping the intermediate python frames.
2025-12-12 15:46:49 +01:00
Giacomo Vercesi 8af5e1d05c Implement revng2 quick artifact 2025-12-10 16:16:14 +01:00
Giacomo Vercesi e3b263d9da Implement revng2 project init 2025-12-10 16:16:14 +01:00
Alessandro Di Federico bce32d9669 Default to --emit-hex-constant-literals-from=4096 2025-11-28 11:21:18 +01:00
Tommaso Fontana 9f5ca81401 Pypeline: introduce analysis lists
Now in the pipeline.yml you can specify lists of analysis that are run
sequentially.
2025-11-24 16:41:15 +01:00
Giacomo Vercesi d90f6ff0f5 revng2: use cache_directory from support 2025-11-17 10:04:12 +01:00
Tommaso Fontana 8ae70d85d4 Pypeline: replace logging with custom log
Now the pype command has a `--verbose` argument that to enable debug
logging in the pypelien code.
Adapted the codebase to use this new logging format but replacing
`logging` with `revng.pypeline.utils.logger`, this is done in
preparation of debug-log.
2025-11-11 17:15:28 +01:00
Tommaso Fontana 036411b441 Pypeline: add pipebox initialize and -- args
The pipebox now has to have an initialize function that is called with
all arguments passed to the CLI after --.
2025-11-11 17:15:28 +01:00
Tommaso Fontana 639593164a Pypeline: add autocomplete and refactor CLI
Now pype has an `autocomplete` command usable to enable autocompletion
and revng2 now is based on `pype`, modifying its defalults and
injecting new commands.
2025-11-11 17:15:27 +01:00
Giacomo Vercesi 145bd01279 generate-migrations: remove __init__
Remove the `__init__` function from the template used by the
`revng generate-migrations` command, so far it hasn't been used.
2025-10-16 16:08:05 +02:00
Giacomo Vercesi 6bdc3c9179 fetch-debuginfo: fix parsing of PDB filename
The PDB filename is up to the first `\x00`, everything else after should
be discarded.
2025-10-15 11:58:11 +02:00
Ivan Krysak 00ea93c99e TTG: move metaschema.yml to share/revng/ 2025-10-13 18:33:10 +03:00
Ivan Krysak 04fdc2028a migrations: do not duplicate the template 2025-10-13 18:33:10 +03:00
Ivan Krysak e56f543b1a Split module.bc.zstd 2025-10-13 10:26:41 +03:00
Ivan Krysak ed53e759c9 Do not use -Y flag
Yaml model are now the _only_ way to store them, no point in still
specifying the old flag for it.
2025-10-13 10:26:41 +03:00
Tommaso Fontana 80eb02c207 Pypeline: merge pypeline 2025-09-10 12:05:15 +02:00
Tommaso Fontana 680f5cacf2 Apply revng check-conventions --force-format 2025-09-10 12:05:14 +02:00
Giacomo Vercesi 62421eeaa2 fetch debuginfo: switch default servers
Switch the default servers used by `fetch debuginfo` to revng-managed
ones, as especially the elfutils.org once has been spotty in the past.
2025-08-08 17:52:57 +02:00
Giacomo Vercesi 78e66e0d08 cli: move model import idb in separate dir
Move the two python scripts that compose the `revng model import idb`
command into a separate subdirectory.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi 38b50c2977 tupletree: fix Reference class
Fix the `Reference` class, make it work with the new model and allow it
to be dereferences via the `_accessor` attribute.
2025-07-18 09:30:55 +02:00
Ivan Krysak 452612eaea import-idb: fix misuse of PrimitiveType object 2025-06-27 17:42:27 +03:00