-
Notifications
You must be signed in to change notification settings - Fork 29
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
First release: make default async, replace specs-generator system, trim down and organize files, etc. #27
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…h; make discord_gateway REST function default to asynchronous; type-safe assignment; make it possible to toggle a request to be sync by passing it the object address
…() missing the return datatype flag set
…el, discord_execute_webhook() wrong return type
Make async default
…ommon/ references
…o concord's code style
…pecting a datatype return
…hing from make docs rule
lcsmuller
added a commit
to Cogmasters/concord-dev-docs
that referenced
this pull request
Mar 1, 2022
… a false evaluation
Closed
This was referenced Mar 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR outlines implementation details for the first release of Concord, it differs from Orca in a couple aspects:
specs-gen
(JSON-based code generator) with gencodecs (a macro based generator).More
Changes for the user wishing to migrate their codebase to Concord
Why?
specs-gen
was not flexible and required modification of its source-code for any little fix or change. It relied on a custom-made JSON specs system that would be fed to it for generating code.gencodecs
takes advantage of well-knownC Preprocessor
tools - in case a custom-type or behavior is required the user can create a custom macro wrapping for it, without a need to modify gencodecs source code directly.json_extract()
is not debugging friendly because it relies on variadic arguments for fetching JSON values, without any kind of type-checking to guarantee correctness of argument and expected JSON type.json_inject()
is not debugging friendly for the same reasons outlined above forjson_extract()
, and the itssize
was not respected, leading to crashes if the buffer it not large enough to accommodate the JSON.How?
See Async requests are now the default behavior
json_extract()
unsafe conversionjsmn-find
fixes this by simply fetching the JSON token as a string, and leaving the conversion to the user.json_inject()
unsafe conversionjson-build
fixes this by strict type-checking via its function parameters