Skip to content
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

Improve Core Functionality #4881

Merged
merged 12 commits into from
May 21, 2020
Merged

Conversation

sturnclaw
Copy link
Member

This was split from #4879, as that PR needs some more time to cook.

I've upgraded our logging functionality to remove the need for OS::RedirectStdio as well as adding better formatting and more logging levels. I've also added argh to improve our command-line argument parsing (actually upgrading the parsing is going to happen in a separate PR, this just adds the module).

  • Moved some functionality to the core/ module (compression, IniConfig, etc.)
  • Added external libraries to contrib/: nonstd::string_view for an easier way to pass around strings without copying them, argh to replace our ad-hoc and ugly command line parsing
  • Added some more performance information and restructured the way it's displayed
  • Made the performance info widget available in the main menu
  • Moved the modelcompiler run step into its own target - make -C build build-data invokes this.

sturnclaw added 8 commits May 15, 2020 16:32
- string_view is a C++17 shim for better string manipulation
Make LZ4 (de)compression more efficient with non-owning string views
Add argh to make command line argument parsing easier
This is primarily to make tool development easier - right now the only
way to build a tool without linking all 90MB+ of pioneer binary into the
tool is to cherry-pick a set of cpp files and hope you have all the
symbols you need for what you're doing.

Over time, "generic" functionality like compression, math, etc. will be
moved to the core module so tools can link against one library without
incurring lengthy link and compile times.
- PerfInfo window can be opened from options menu
- Performance window is available regardless of WITH_DEVKEYS
- Cleaned up some output messages
- Added a Perf::Stats instance to Galaxy
Might get merged with another more general instance depending upon usage patterns.
- Need to add to AUTHORS.txt, will do with string_view and argh
- Shim Error, Warning and Output to the new log framework
- Add multiple non-error log levels, and a non-fatal error log level
- Use fmt::fmt to format args instead of snprintf, avoid using variadics
- Remove the (no-op) OpenGLDebugMsg function
Now that the log framework can intelligently write to a file as well, there's no need to redirect the stdio streams.
@sturnclaw
Copy link
Member Author

sturnclaw commented May 21, 2020

In this PR I've also included fixes for LuaMetaType outliving the lua instance, removed the old and unneeded atexit handler for LuaObject, fixed the handling of const member functions, and finally got the clang-format check working again!

EDIT: the above is being moved to a new PR to avoid bloat and get this merged now.

@sturnclaw
Copy link
Member Author

sturnclaw commented May 21, 2020

As there hasn't been any pushback on this, merging now!

@sturnclaw sturnclaw merged commit 7bea11c into pioneerspacesim:master May 21, 2020
@sturnclaw sturnclaw deleted the core-upgrade branch May 21, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant