forked from ninja-build/ninja
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I attempted to have conversations with maintainers at the ninja project on ways to modify ninja to make it possible for clients to write their own frontends, or to configure the frontend behavior of ninja. Here are some examples:
- Second, heavy binary issue from nico
- My large experimental PR that creates a library
- An earlier attempt at an external frontend
I failed to get any interest from ninja maintainers. This project seems more lively. Would this project be interested in splitting out a static library that could help clients to create their own frontends? Specifically I'm proposing:
- We need a system for doing logging that allows library clients to capture log messages and emit them their own way. jonesmz suggests a design similar to boost, but constrained to a few points:
- Multiple backends, so I can dynamically target log files, console output, or a logging server on the network, as I feel like at runtime.
- Dynamic variables captured with each log statement, which can include the current functions name, or the current timestamp, or what have you.
- Easy to replace the functionality using macros. E.g. I can provide my own logging statements that customize what gets logged, by defining a macro that i call.
- Introduction of a splinter namespace. This is just nice when you're a library. Removing 'using namespace std' anywhere it is still used in headers (if applicable).
- Separation of a ui layer which is in charge of parsing commandline arguments into various structs for holding configurable behavior. Pass these structs into configurable functions to change behavior.
- No more logic for "things are going badly, exit now". So no ExitNow function.
- Removal of global state - some gets pushed into State, which can be reset on rebuild, some gets pushed into the new Execution class.
- Introduction of public header files. They'll live in some dedicated directory and we'll need to commit to some kind of way to avoid constantly breaking changes.
I'm less familiar with this fork than I am with ninja, so forgive me if some of these don't apply. I'm just trying to be clear about intent so we can discuss whether or not this is desirable from a common understanding.
nishantjr
Metadata
Metadata
Assignees
Labels
No labels