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

refactor: added json to dpp.h includes #922

Closed
wants to merge 1 commit into from
Closed

refactor: added json to dpp.h includes #922

wants to merge 1 commit into from

Conversation

Jaskowicz1
Copy link
Contributor

This PR adds json_fwd.h and json.h into the dpp.h includes, this means we aren't relying on other headers to include json as, if they have json removed, json will no longer be implemented by default.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 87a9243
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/651e88039b1a1e000897249e
😎 Deploy Preview https://deploy-preview-922--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Oct 5, 2023
Copy link
Member

@Mishura4 Mishura4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need both, json_fwd.h is the forward declaration and json.h is the full thing

@@ -73,3 +73,5 @@
#include <dpp/discordevents.h>
#include <dpp/timed_listener.h>
#include <dpp/collector.h>
#include <dpp/json_fwd.h>
#include <dpp/json.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't do this as it won't work for packages that have USE_EXTERNAL_JSON defined plus leaving this out is intentional as it slows down the build massively.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that was handled by dpp/json.h though?

@Jaskowicz1 Jaskowicz1 closed this Oct 5, 2023
@Jaskowicz1 Jaskowicz1 deleted the json-moving branch October 14, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Improvements or additions to code. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants