Skip to content

fpp-query: tool for listing files an autocoder will generate - #100

Merged
Kronos3 merged 3 commits into
masterfrom
fpp-query
Sep 20, 2026
Merged

Kronos3 merged 3 commits into
masterfrom
fpp-query

Conversation

@Kronos3

@Kronos3 Kronos3 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

This PR includes a new tool fpp-query which is a syntax-only FPP tool for matching to AST nodes and generating file listings. It is essentially a general-purpose version of fpp-filenames which is meant for custom FPP autocoders to provide a very fast CMake configure which needs to query every .fpp file against every FPP autocoder.

I found that when working which Python to provide both autocoding and the configure-stage filenames, CMake configuration (fprime-util generate) slowed down considerably. This tool replaces filename listing step.

It works by traversing the AST looking for configured node kinds to match. Then it converts them into a JSON serde_json::Value and matches a when predicate to them. The predicate uses a simple expression-based DSL to match to different kinds of rules. All the rules are driven by .toml files which are hooked into fpp-query via the --rule option (required)

The tool also comes with some "presets" which provide the same functionality of fpp-filenames and all the option variants of the tool. These presets can be useful for examples/reference.

@Kronos3
Kronos3 merged commit bbe1371 into master Sep 20, 2026
27 checks passed
@Kronos3
Kronos3 deleted the fpp-query branch September 20, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant