-
Notifications
You must be signed in to change notification settings - Fork 103
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
Configuration: Split options into global and per-module configuration #3590
Conversation
415a9c3
to
9367dc7
Compare
Aaargh. When did those tests break? |
It can be useful to know if two `SharedLibrary` instances refer to the same DSO. The new `SharedLibrary::Handle` implements such a comparable handle. This works because `dlopen` guarantees that loading an already-loaded DSO returns the same handle.
This lets each module define its own options, without needing the option names to be unique across all modules. Also organises the module-specific options into their own sections at the end of the help text.
Apparently this isn't necessary on 24.10? The code definitely uses it, though.
…on per module. `mo::ProgramOption::parse_arguments()` assumes that the *first* argument in the arguments array is `argv[0]`; that is, the name of the calling binary, and so it strips it out. This was causing us to consume an unparsed argument for each module we had loaded. Instead, insert `argv[0]` into the argument array before parsing.
If there aren't any unparsed tokens left then we don't need to see if any remaining modules might consume them.
…rdered_map` This existed for hysterical raisins, but those got evenually whittled down over the course of development, and now `std::unordered_map` does what we want.
5297983
to
7fd62d0
Compare
Now with fewer conflicts 🤦♀️ |
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.
Generally, I like the approach and the result.
In addition to the naming tweaks and mircommon stanza, this breaks ABI for mirplatform and mirserver
Oops! The "Symbols Check" is failing because the
...I guess it does need fixing after all |
Hmm, that's weird. It seems that the code builds fine without them. I just thought I accidentally added them so I deleted them... |
Nothing weird about it. The Check runs The problem is that the script wrongly expects the |
Maybe the way forward is to inline the template<>
struct std::hash<mir::SharedLibrary::Handle>
{
auto operator()(mir::SharedLibrary::Handle const& handle) const noexcept -> std::size_t
{
// either
return std::hash<void*>{}(handle.handle);
// or
return handle.hash(); // With a hash() implementation in `SharedLibrary::Handle`
}
}; |
@tarek-y-ismail you should be able to test the symbols check with
|
As I expected, the generator script still exports
|
yes, the script is doing the wrong thing. Which wouldn't matter if we didn't rely on it for symbols checking |
This lets each module define its own options, without needing the option names to be unique across all modules.
Also organises the module-specific options into their own sections at the end of the help text.