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

Forward declare all third party dependency in core code #741

Closed
andyfengHKU opened this issue Aug 9, 2022 · 0 comments
Closed

Forward declare all third party dependency in core code #741

andyfengHKU opened this issue Aug 9, 2022 · 0 comments
Assignees

Comments

@andyfengHKU
Copy link
Contributor

This has been a known problem in our code base. Spdlog as a very big header-only library was introduced into buffer_manager.h and then indirectly being included in almost all files which causes the build time of each file to increase from 1s to 5s.

Now that we have forward declared Spdlog, there are still other third-party header-only libraries that are being used in a very similar way. nlohmann_json is an example. I was trying to forward declare it and it seems hard to do so (though a possible solution exists here nlohmann/json#700). Someone should try to solve this by either

  • forward declare; or
  • use our interval data structure in the core and only convert to nlohmann_json at the top-most level e.g. main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants