-
Notifications
You must be signed in to change notification settings - Fork 51
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
[cleanup] partial migration from json-c to jansson #1501
Conversation
Problem: t/rpc/rpc.c still uses json-c. Convert to jansson.
Problem: t/rpc/mrpc.c still uses json-c. Use flux_respond_pack() in that one instance.
Problem: t/request/req.c conntains lines with trailing white space which makes vim/git sad. Delete trailing white space.
Problem: t/request/req.c still uses json-c. Convert to jansson and the "pack" RPC functions.
Problem: t/request/treq.c is still using jsonc-c. Convert to jansson.
Problem: cmd/flux includes shortjson.h but doesn't use it. Drop the extraneous include.
Problem: libutil/tstat includes shortjson.h but doesn't use it. Drop the extraneous include.
Problem: module test includes shortjson.h but doesn't use it. Drop extraneous include
Problem: doc/man3/treduce.c is still using json-c. Convert to rpc pack functions.
Problem: doc/man3/tmrpc_then.c is still using json-c.
Problem: cmdhelp is still using json-c. Convert to jansson.
Problem: flux-comms was including shortjson.h but not using it. Drop extraneous include.
Problem: flux-jstat is still using json-c. Convert to jansson.
Simplify code in lwj_kvs_path() by using flux_rpc_pack() and flux_rpc_get_unpack() instead of "hand parsing" the JSON payloads.
Problem: libsubprocess library still uses json-c. Convert to jansson. Drop extraneous json-c includes from subprocess/zio unit tests as well.
Codecov Report
@@ Coverage Diff @@
## master #1501 +/- ##
==========================================
- Coverage 78.78% 78.74% -0.05%
==========================================
Files 164 164
Lines 30706 30680 -26
==========================================
- Hits 24192 24158 -34
- Misses 6514 6522 +8
|
Just looked at jsc and jstat. Thank you for the long desired jansson conversion! I just have one inlined comment above. |
http://pubs.opengroup.org/onlinepubs/009695399/functions/free.html |
@dongahn, I did not convert jsc, just one RPC that was an easy one. It's a lot of work and may be replaced anyway so I punted. |
Nice cleanup! Sorry about the Lua bindings, now I feel really bad :-( Should I push my commit for wreck/job.c here or keep it in my current devel branch? |
Actually this is nice cleanup. I think it should be merged now. |
This PR converts a number of residual users of json-c over to jansson. This is mostly the small stuff.
I skipped wreck/job.c because I think @grondo has already fixed that one offline.
The remaining areas in flux-core that still use json-c are: