Skip to content

SIP78 Convert switches to run time options #96

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Alomir
Copy link
Collaborator

@Alomir Alomir commented Jun 11, 2025

#78

This is Part 1, since this is a good place to partition the work, and I've made enough huge PRs recently...

This PR:

  • Creates a global Context struct to hold config options
  • Reads options from both sipnet.in and the command line, merging them into the Context object (command line has precedence)
  • Adds command-line options for a few params as proof of concept
  • Updates the help text with this change
  • Uses a hash_map (based on uthash, a third-party header file) to manage metadata about context params, including what source the param value comes from
  • Adds option to dump the final merged config into a file named <inputfile>.config (e.g., niwot.config)
  • Removes namelistinput, as that is superseded by the Context

Part 2 of this task will be to convert the compiler switches that we are keeping as options to run-time args, update the Context and cli for these options, and remove/massage code related to the flags that we are removing or hard-coding on.

@Alomir Alomir marked this pull request as ready for review June 11, 2025 21:23
@Alomir Alomir requested review from dlebauer and infotroph June 11, 2025 21:41
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