Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLH] Pass options via a json file instead of command line arguments #164

Closed
arthaud opened this issue Jun 17, 2024 · 0 comments
Closed

Comments

@arthaud
Copy link
Contributor

arthaud commented Jun 17, 2024

Mariana Trench consists of:

  • The shim, a small python script, which parses user-provided command line options and calls the binary
  • The C++ binary, which actually performs the analysis.

To pass the user-provided options from python to C++, we currently build a very long command from python:
https://github.com/facebook/mariana-trench/blob/main/shim/shim.py#L610-L748
We then parse those options from C++:
https://github.com/facebook/mariana-trench/blob/main/source/Options.cpp#L151-L306

While this works fine, we risk running into the maximum size of a command line (although unlikely): https://unix.stackexchange.com/questions/120642/what-defines-the-maximum-size-for-a-command-single-argument
It is also painful to debug problems with argument passing.

For these reasons, we would like to implement a new way of passing arguments:
The shim should create a temporary json file containing all parameters, and the C++ binary would just parse that file.

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 a pull request may close this issue.

1 participant