Skip to content

Add possibility to export manifest as json - #384

Closed
afbjorklund wants to merge 3 commits into
ccache:masterfrom
afbjorklund:manifest_json
Closed

afbjorklund wants to merge 3 commits into
ccache:masterfrom
afbjorklund:manifest_json

Conversation

@afbjorklund

Copy link
Copy Markdown
Contributor

The manifest format is binary and optimized for performance and storage...
When discussing the manifest, it can be useful to export it to simple JSON.

Note that this format potentially duplicates both file strings and file entries.
If you are concerned about that (even for debug output), you can try gzip.


Includes sample python program, and a JSON Schema for the format used.

@jrosdahl

Copy link
Copy Markdown
Member

Who/what do you see will be the consumer of the JSON manifest data? Do you envision other tools than the check-manifest.py script?

The reason I'm asking is that I like the basic idea of the check-manifest.py script, but I'm less sure about whether the intermediary JSON format is of enough value. Not that the code would be much baggage, I'm just trying to understand the potential use cases here.

I originally implemented the --dump-manifest functionality as a separate script (removed in 8c60a38), but I chose to make it a proper ccache command to avoid knowledge about the manifest format outside of the ccache binary. Even though the check-manifest.py does not depend on the exact manifest binary format, it still depends on the general manifest structure. So I guess what I'm angling for is if you think that it would be OK or even better to just implement functionality similar to check-manifest.py in ccache itself as a debug option?

@jrosdahl jrosdahl added the issue: feature New feature label Apr 21, 2019
@afbjorklund

Copy link
Copy Markdown
Contributor Author

I have only used it for debugging purposes, not sure if it is useful for a user.
One of the programs seemed generic enough to make for an example...

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Note that the check-manifest.py performs the same function as a normal ccache cache check.

Just that it might be easier to follow along in the python code with json, instead of the real thing ?

@jrosdahl

jrosdahl commented May 7, 2019 •

Copy link
Copy Markdown
Member

Closing this as I would prefer to not duplicate logic outside the ccache code.

@jrosdahl jrosdahl closed this May 7, 2019
@afbjorklund

Copy link
Copy Markdown
Contributor Author

Plan was to use the same export format for the result file, using base64 encoding for the file contents...

I guess the --dump-result will just create files with the contents, rather than writing them on console ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants