Skip to content

Conversation

Kronos3
Copy link
Collaborator

@Kronos3 Kronos3 commented Sep 4, 2025

This PR creates a single FPP entrypoint that wraps our tools. It passes a single argument to a scopt parser to allow parsing the FPP command. The top level entrypoint select the tool to run and then passes off the rest of the arguments to that tools entrypoint.

The main tool also includes a nice --help message to guide users (I copied the --help style of Docker and git):

$ fpp --help
fpp v3.0.1a1-1-g72d368fdd
Usage: fpp [options] COMMAND

FPP Commands:

check       performs semantic checking of FPP models
depend      computes dependencies for FPP source files
filenames   writes out the names of C++ files generated from FPP source files
format      parses FPP source files and writes out formatted source files
from-xml    parses older F Prime XML files and converts them to FPP files
locate-defs parses FPP source files and reports the locations of symbol definitions
locate-uses parses FPP source files and reports the locations of symbols used in the files
syntax      parses FPP source files into an abstract syntax tree (AST) and optionally writes out the AST
to-cpp      parses FPP models, performs semantic checking on them, and writes out C++ files
to-dict     writes JSON dictionaries corresponding to F Prime topologies
to-json     parses an FPP model, performs semantic checking on it, and writes out the model in JSON
to-layout   writes layout text files for connection graphs within F Prime topologies

  -h, --help     print this message and exit
  -v, --version  print version and exit
  COMMAND

Run 'fpp COMMAND --help' for more information on a command.

Closes #798

  • Get CI to pass here
  • Make sure we are publishing all the tools we need to work with F Prime, e.g., wrappers like fpp-check that call fpp check.
  • Make an alpha release against this branch.
  • Create a PR to F Prime with any changes to install this version of FPP. Get CI to pass there and merge the PR.
  • Merge this PR.

@bocchino
Copy link
Collaborator

bocchino commented Sep 4, 2025

@Kronos3 I see that fpp-to-xml isn't there. Is a side effect of this PR to remove fpp-to-xml from the tool set? If so, does this PR also close #770?

@Kronos3
Copy link
Collaborator Author

Kronos3 commented Sep 4, 2025

Ah good catch, to-xml is actually included I just forgot to put it in the help message since I was getting the descriptions from https://github.com/nasa/fpp/wiki/Tools where its missing. I'll add it in.

@bocchino bocchino added the fprime-fpp tandem F Prime and FPP tandem development label Sep 4, 2025
@bocchino
Copy link
Collaborator

bocchino commented Sep 4, 2025

I'm marking this PR as fprime-fpp-tandem, since this represents a significant change to how we publish the FPP tools to F Prime. Before merging this PR, let's make sure we have worked out the details of how F Prime will use this version of the tools.

@bocchino
Copy link
Collaborator

bocchino commented Sep 4, 2025

I'll add it in.

How about if we don't add it in, and just consolidate #770 with this PR? Otherwise we'll need to add it in now and then remove it later.

@bocchino
Copy link
Collaborator

bocchino commented Sep 4, 2025

Alternatively we could do #770 and then merge this PR. I'd rather not add fpp-to-xml to this PR.

@Kronos3 Kronos3 mentioned this pull request Sep 4, 2025
@Kronos3
Copy link
Collaborator Author

Kronos3 commented Sep 4, 2025

I did a combo of both, I opened a PR that removes To-XML entirely against this PR.

@bocchino
Copy link
Collaborator

bocchino commented Sep 4, 2025

@Kronos3 It looks like the FPP unit tests are passing, but the native image build is failing. At this point I think we can hand it over to @LeStarch to fix the native image build. He said he would help us with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fprime-fpp tandem F Prime and FPP tandem development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify FPP into a single tool
2 participants