-
Notifications
You must be signed in to change notification settings - Fork 68
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
Make env_logger an optional dependency #1226
Conversation
Now the built-in env_logger is guarded behind a Cargo feature "builtin_env_logger". It is a default feature, but can be disabled in Cargo.toml by setting `dependencies.mmtk.default-features = false`. In this way, VM bindings that want to implement its own logger can remove the env_logger crate from its dependencies.
memory_manager::mmtk_init simply calls `try_init()` now.
JikesRVM failed once with "Failing instruction starting at f7cbd615 wasn't in RVM address space", a known bug. |
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
I just have a quick question about this. Let's say in the future we add a new feature to the list of default features, is there a way to selectively disable |
Unfortunately there is no way to selectively disable some default features for now. There is an issue (rust-lang/cargo#3126) for Cargo, and it is still open now. But the user can always copy the list of default features and explicitly enable some of them. |
In that case, maybe it is better to make it a negation? As in |
Now the built-in
env_logger
is guarded behind a Cargo feature "builtin_env_logger". It is a default feature, but can be disabled in Cargo.toml by settingdependencies.mmtk.default-features = false
. In this way, VM bindings that want to implement its own logger can remove theenv_logger
crate from its dependencies.Fixes: #744