-
-
Notifications
You must be signed in to change notification settings - Fork 26
Process args in to Server instead of mutating & referencing args in the program #54
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
base: parser
Are you sure you want to change the base?
Conversation
| args: Args; | ||
| quit := false; | ||
|
|
||
| // This is from the config file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed because misleading: roots et al are discovered if not set to anything in config.
| log_error("Could not parse arguments"); | ||
| exit(1); | ||
| } | ||
| log("Args are %", args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subtle difference in logging here. Previously the code logged the args including the result of any compiler path finding work, now it does not, which seems fine as a) more honest w.r.t. actual passed args & b) the compiler path finding has its own logging.
fc5c9e8 to
75dafc4
Compare
dccc583 to
5e3b98c
Compare
| verbose: bool; | ||
| profile: bool; | ||
| jai_path: string; | ||
| jai_exe_name: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having this in Args seemed a bit of a hack to me, seeing as it wasn't actually settable from the cli or even the config. But now we don't need it here, it just lives in server.
This allows for some separation between what the user asked for in args and what the internals reference. It makes things easier in a multi-project setting (the
serverbecomes per-project & should represent all the state for it, settings like jai path can be different per project). It also seems better prep for using Jails as a library.