# Are there offline tools for snooping \*.ji files?

**URL:** <https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689>\
**Category:** Internals & Design\
**Tags:** precompilation\
**Created:** [September 16, 2020, 6:09am UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689 "2020-09-16T06:09:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [September 16, 2020, 6:09am UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689/1 "2020-09-16T06:09:31Z")

</div>

If I understand correctly, most of the loading of the \*.ji file is done by C code, and the parsing and applying phases are not (yet) well separated. This makes it difficult to analyze the contents of the \*.ji file without causing side effects to the world.

I’ve faced pre-compilation issues several times in package development, and I have no choice but to wait and trust that the core developers of Julia will fix the problems.

I think tools like a protocol analyzer, which provide data structure analysis and annotated HEX dumps, would be helpful in clarifying the problems.

Does such tools exist? Or do you think such a tool would be helpful?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [September 16, 2020, 10:28am UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689/2 "2020-09-16T10:28:31Z")

</div>

That would be very nice indeed. `Base.parse_cache_header` loads the header, but the more detailed contents are not available from within Julia as far as I know.

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [September 17, 2020, 5:52am UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689/3 "2020-09-17T05:52:42Z")

</div>

First, I would like to explore whether the tools of the [Kaitai Struct](https://kaitai.io/) could be used for this purpose. Apart from that, it might be useful to port the Kaitai Struct Compiler to Julia.

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [September 19, 2020, 1:11pm UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689/4 "2020-09-19T13:11:42Z")

</div>

(Note that some of the tutorials linked from the documentation may be NSFW. 😅)

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [October 4, 2020, 8:40am UTC](https://discourse.julialang.org/t/are-there-offline-tools-for-snooping-ji-files/46689/5 "2020-10-04T08:40:49Z")

</div>

BTW, the ksy file equivalent to `Base.parse_cache_header` has been completed.

 ![ji](https://global.discourse-cdn.com/julialang/original/3X/b/b/bbad4445048fa91514a51168a7dd1222f04e53b5.png)  
I’m translating the serializer part into ksy, bit by bit. I am puzzled by the subtle incompatibility with `Serialization`. 😄

([Kaitai Web IDE](https://ide.kaitai.io/) is a great tool, but it seems to have some minor bugs (e.g. LSB of `uuidHi`/`uuidLo`). Also the [extension for VS Code](https://marketplace.visualstudio.com/items?itemName=fudgepops.kaitai-struct-vscode) is somewhat unstable as the author mentioned.)
