-
Notifications
You must be signed in to change notification settings - Fork 13
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
Parse the zipped files into our representation of objects. #529
Comments
Made progress on the current state of libzip in the CS Machines with a commit on wdl/parsing_zipped (thought the branch doesn't show up and I may need to push it). Although share objects exist in repositories /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libzip.so/usr/lib/jvm/java-11-openjdk-amd64/lib/libzip.so |
Was able to successfully open and close a zip file since I finally had the right libraries for zip.h and the header installed in the Virtual Machine. Libzip isn't installed on the CS machines so as of now I am not able to use libzip on the CS machines. Will push my progress once I am able to fix errors pushing onto Github. Apparently there are errors with remotes. |
Pushed progress on using libzip where I figured out how to get file indexes and get files from name (has to be specific directory) or index. Next I will use Noah's implementation to make JSON objects and push that onto master |
I have pushed code that will make JSON objects, but specifically only for the 5 JSON files in the sandbox in wdl in parsed_zipped directory. However, the errors present are because of JSON not being present in the VMs so I will either install JSON myself tonight or, depending on how fast techstaff acts, use my own computer with libzip installed. I have implemented a way to loop through all files in a zip directory, however I will need to figure out how to: |
Pushed Pseudocode that I will work on tomorrow for parsing zip files into general objects. I will loop through the zip files and in any json files I will loop through them and add the key value pairs to the general object |
Turned most of Pseudocode into real code. However, the only parts I was able to test right now are to see if the functions that parsed directories as a string (like game/game/actions.json) was able to parse correctly. If we are able to install libzip soon then we should use the CS machnes. Otherwise anyone who wants to test will need to install json-c and libzip on a VM. Things done: Still need to get done: |
Moving this issue to Sprint 4 since this issue wasn't complete by Sprint 3. Also assigning Nam to this issue since this is something we need to get done for teams to test their code. |
I tried to use @dtbukowski's As another note, I've decided to use this zip library because right now as a backup option in case it takes a while to get libzip onto the CSIL machines (which chiventure is exclusively tested and run on), and it is far more convenient to simply bundle in this lightweight and simple alternative, which is also under the Unlicense. |
An update to the zip library situation: we were advised a workaround to have libzip available for building chiventure on the CSIL machines (in the |
I have managed to patch the wdz loading feature into the current WDL, albeit in a really rudimentary way. We can now pass a wdz file into the chiventure executable, and instead of loading up the main UI and game, chiventure will print out the contents of all JSON files in the wdz archive to confirm that it can read the archive. |
I managed to set up my parsing_zipped branch with cmake and got the code to compile without issues. |
Successfully merged a branch that contains the zip loading functionality and a way to check if the JSON files have been read. See #800. Functionality for actually turning those json objects into internal game objects and loading them into our object store is pending, and might become a backlog issue for later. |
It looks like #806 is refusing to pass on the csil machines no matter what I try; the program does not break when run in valgrind, and gdb traces look identical to what they are on a working, non-crashing build on my personal machine; furthermore, the latest merges to dev (with wdl_ctx) have also conflicted with this request. Therefore, this should receive more attention in a separate (possibly backlog) issue, and we are closing this one which did result in a successful PR with the zip file loading. |
Issue Score: ✔️+ Comments:
|
Communicate with Nam with how the .wdz files look, then parse those files into the representation of objects that blake and noah decided on.
The text was updated successfully, but these errors were encountered: