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

No JSON whitespace in release version #887

Closed
wants to merge 1 commit into from

Conversation

fr-an-k
Copy link
Contributor

@fr-an-k fr-an-k commented Dec 2, 2023

See #886 - (I didn't manage to rebase the original feature branch that I accidentally branched of another feature branch in reasonable time).

I considered this feature as a runtime option, but it would be more work and I don't know how to compile the c file twice to produce the same function with a different flag, without creating a mess.

I could however, make this as an optional DISABLE_JSON_WHITESPACE flag rather than default when DEBUG is not set.

IMHO a sleak release version by default is a more important use case, and therefore should not include unnecessary whitespace or conditionals.

JSON readability is for debugging and should be done by piping, autoformat, setting the flag, 2 variants of each program, or using the debug version.

YAML/JSON5 would more suitable for readability anyway, and could also be done with macro's in out_json, but someone else can do that.

Copy link

codecov bot commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c58344f) 73.77% compared to head (5ac8602) 73.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #887   +/-   ##
=======================================
  Coverage   73.77%   73.77%           
=======================================
  Files           2        2           
  Lines         122      122           
=======================================
  Hits           90       90           
  Misses         32       32           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fr-an-k
Copy link
Contributor Author

fr-an-k commented Dec 2, 2023

Wait, I forgot to check the JSON, there's a small issue.

Copy link
Contributor

@rurban rurban left a comment

Choose a reason for hiding this comment

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

thanks, good work. but this needs a CLA from the FSF, which needs some time

@rurban rurban self-assigned this Dec 3, 2023
@rurban rurban added cla_needed Waiting for the Copyright assignment enhancement New feature or request labels Dec 3, 2023
@fr-an-k
Copy link
Contributor Author

fr-an-k commented Dec 3, 2023

The JSON issue was not related to this PR.
I checked the JSON of a working DXF and it's fine.

rurban added a commit that referenced this pull request Feb 7, 2024
no whitespace at run-time.
We don't write minimal JSON as with minimal DXFs anymore
($ACADVER, $HANDSEED, and then ENTITIES only).
With ideas from GH #887
@rurban
Copy link
Contributor

rurban commented Feb 7, 2024

I'll be doing it at runtime, by using a minJson format

@rurban rurban closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla_needed Waiting for the Copyright assignment enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants