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

Refactor command line flag handling for plugins #842

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

Alasdair
Copy link
Collaborator

Flags are now created with the Flag.create function.

These are then converted into the strings Arg.parse and similar use in src/bin/sail.ml. The output of sail -h remains the same, so no actual flags have changed.

Flags can now have more data, i.e. rather than "-lem_split_files", it can now be:

Flag.create ~prefix:["lem"] "split_files"

meaning we can now recognize this flag is part of the lem options and parse it from e.g. a JSON configuration file as lem.split_files (although this is not done as part of this PR).

Flags are now created with the `Flag.create` function.

These are then converted into the strings Arg.parse and similar use
in `src/bin/sail.ml`. The output of `sail -h` remains the same, so no
actual flags have changed.

Flags can now have more data, i.e. rather than "-lem_split_files", it can now be:
```
Flag.create ~prefix:["lem"] "split_files"
```
meaning we can now recognize this flag is part of the lem options and parse it from e.g.
a JSON configuration file as `lem.split_files`.
Copy link

github-actions bot commented Dec 18, 2024

Test Results

   12 files  ±0     24 suites  ±0   0s ⏱️ ±0s
  738 tests ±0    738 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 466 runs  ±0  2 465 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 562a5c9. ± Comparison against base commit 304b491.

♻️ This comment has been updated with latest results.

@Alasdair Alasdair merged commit fd18b93 into sail2 Dec 18, 2024
9 checks passed
@Alasdair Alasdair deleted the new_plugin_flags branch December 18, 2024 18:07
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