-
Notifications
You must be signed in to change notification settings - Fork 77
Remove env_var and command_line from options #1240
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
Conversation
Remove env_var and command_line because they can all be set in both ways. Also renamed functions that set options by name, and removed "convenient methods" in MMTKBuilder and memory_manager.
Require T in MMTKOption<T> to implemnt FromStr because we use parse::<T>() anyway. Move Default out of macro. Update comments.
8004a10
to
8941384
Compare
We restore to the naming style similar to the old names.
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.
LGTM
The extended tests passed except for JikesRVM which failed for the well-known "xxxx is not in RVM space" error. I just added a change to the API migration log, and this should be ready to merge now. I removed the |
391c0fe
to
fde940d
Compare
Removed
from_env_var
andfrom_command_line
fromMMTkOption
because now all options can be set in both ways.Replaced
Options::set_from_command_line
andOptions::set_from_env_var
with a singleOptions::set_from_string
.Moved several methods of
Options
out of theoptions!
macro if they don't need to be generated via macro expansion. Now only two methods are generated by the macro.set_from_string_inner
: Requires matching field names against user-provided strings.new
: Initializing fields using default values.In order to replicate the behavior that
Options::read_env_var_settings
silently ignores unrecognized option keys inMMTK_*
environment variables, we introduced an error typeSetOptionByStringError
whichOptions::set_from_string_inner
returns so thatOptions::read_env_var_settings
andOptions::set_bulk_from_string
can behave differently when encountering invalid keys.