-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dedicated Test Subtests for Different File Types #41
Labels
enhancement
New feature or request
Comments
Offroaders123
added a commit
that referenced
this issue
Nov 28, 2023
Right now the tests aren't passing, and that's because of my current handling for ListTag item types, for empty lists. If a ListTag is empty, right now NBTify will just type the list with an EndTag as the item type. So to make things compile symmetrically, I need to find a way to persist the intended item type for empty ListTags. https://www.reddit.com/r/technicalminecraft/comments/gf62x4/how_to_convert_litematic_file_to_schematic_file/ https://github.com/GoldenDelicios/Lite2Edit https://minecraft.wiki/w/Schematic_file_format https://github.com/SmylerMC/litemapy https://github.com/maruohon/litematica https://github.com/Lunatrius/Schematica https://minecraft.wiki/w/Structure_file https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontostructureblocks?view=minecraft-bedrock-stable https://github.com/microsoft/minecraft-samples/blob/main/structure_blocks_sample_behavior_pack/README.md https://www.youtube.com/watch?v=fQZOPAoxw9Q https://www.planetminecraft.com/project/small-medieval-house-lobby/ Devin Townsend Infinity, I'm loving the sound of this one. The story behind it is very driving too. #40 #41 I really need to work on an improved organizational setup for file type subtests, right now they are all grouped together into a single one, and it's hard to determine what is doing what now. Originally it wasn't so bad because I was only testing against binary NBT files, but now I have things like these world save types, SNBT, and things like that. Each one needs a little bit different of handling for how it should be tested. Another important thing I noticed is that I tried to open a fairly large `.schem` file, and it crashed Dovetail, either because of the UI, or because JS can't handle it's decompressed size, or it's parsed NBT object size, something along those lines. So it afterall may be too hard on the JS implementation of mine to try to do heavy lifting work on world data if it's having trouble opening a Schematic file. I'm hoping I can manage it effectively, but I'm not totally sure. For this big project to work, I may *need* to move to another language for it to work. Up until now, I haven't had any issues with NBTify's power to parse and save things, but it is concerning to have run into them now. Part of the song I'm listening to sounds like it's saying 'don't give up' though, right as I'm writing this, so maybe I should keep trying anyways though :P
Offroaders123
added a commit
that referenced
this issue
Nov 28, 2023
Check out the message about my findings for this commit, in #40 down below, above when this was referenced in that feed when you click on it. Note how the tests are still not passing, it's because SNBT has no way of tracking the types for empty ListTag entries. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol https://stackoverflow.com/questions/31897015/what-is-global-symbol-registry https://stackoverflow.com/questions/49619054/whats-the-purpose-of-registry-symbols-symbol-for-in-javascript-es6 #40 #41 And woah! Who knew the fonts for road signs are standardized! The main one is called Highway Gothic, and it's been around since the 50s. The new one was going to be Clearview, but looks like they reversed making that one the new standard. It's present across a lot of the southwest, I see it a lot when crossing the river into Arizona. I really like it! I hope it stays around.
Offroaders123
added a commit
that referenced
this issue
Nov 28, 2023
This is a recompiled version of the Schematic file, I'm going to use this for the proper diffing of the file for the test. The only changes to the actual output having used it in NBTify is the gzip compression format layout, and the empty ListTag type instance. I'm going to manage that on a check on it's own, outside the scope of this file specifically. Ants is a good song I think, it's my kind of jam for sure. I really like how many places this album goes. I'll have to check out Ocean Machine at some point too, he mentions that one a good deal, it seems to be one of his more widely known early projects. #40 #41
Offroaders123
added a commit
that referenced
this issue
Nov 28, 2023
I need to better account for compression differences with my tests, as right now it depends on which zlib compression implementation you write your NBT files with, will depend on whether the tests will pass or not. This should be excluded I think, I thought it would be perfect to ensure that the compressed versions are the exact same as well, but I don't think that's worthwhile if you can check the raw bytes themselves anyways. Say, to make this file recompiled with the matching zlib layouts, and with the newly updated empty ListTag types ( #40 ), simply opening it with Dovetail and re-saving it didn't work, because it looks like Chrome's zlib backing is different than Node's, even though they both use V8, and they are both on the same macOS ARM machine. So I can rule those things out. I already knew this was the case between Linux and macOS, but I thought this wasn't different between Chrome and Node on the same machine for some reason. I guess I assumed that they would *happen* to be using the same compression implementations, even if they may be two separate installations of that. That would make sense, I didn't expect them to use the same install of it. Just the same or nearly same versions. #40 #41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now I'm running all of my tests in a single subtest, and things are getting very disorganized and chaotic. I want to split things apart so they can use individual logic for each kind of file. Maybe I can use a
switch
statement for the file extension of the current file to test against, then I can choose which extensions get which tests. That seems fairly organized. That can make things easier for defining which types get what tests as well, since one file type might want to use multiple of the tests I make available, rather than one or the other exclusively.The text was updated successfully, but these errors were encountered: