Mutagen-Modding / Spriggit

A tool to facilitate converting Bethesda plugin files to a text based format that can be stored in Git
GNU General Public License v3.0
88 stars 10 forks source link

Incorrect serializer used when deserializing and anything but default version configured #59

Closed JMPZ11 closed 3 months ago

JMPZ11 commented 3 months ago

I was able to export using Spriggit.Yaml.Starfield and 0.18.0 as the custom provider, but the import back to esm is using skyrim

image

2024-05-21 02:00:49.579 -04:00 [INF] Getting meta to use for null at path C:\mods\example.esm
2024-05-21 02:00:49.581 -04:00 [INF] No version specified.  Checking NuGet repositories for latest version
2024-05-21 02:00:49.581 -04:00 [INF]   Looking in repo nuget.org
2024-05-21 02:00:49.809 -04:00 [INF]   GET https://api.nuget.org/v3-flatcontainer/spriggit.yaml.skyrim/index.json
2024-05-21 02:00:49.865 -04:00 [INF]   OK https://api.nuget.org/v3-flatcontainer/spriggit.yaml.skyrim/index.json 55ms
2024-05-21 02:00:49.875 -04:00 [INF] Constructing entry point for Spriggit.Yaml.Skyrim.0.19.0
2024-05-21 02:00:49.877 -04:00 [INF] Restoring for Spriggit.Yaml.Skyrim.0.19.0 at C:\Users\user\AppData\Local\Temp\1zmichpy.dia
2024-05-21 02:00:49.890 -04:00 [INF] 
Noggog commented 3 months ago

Yeah, there's two phases to a deserialization: 1) Finding the target package that the spriggit files used when they were made (TryGetMetaInfo) 2) Once the version is known, downloading that package and doing the deserialization with it

Right now, though, even if you're running the v18 UI/CLI, it downloads the latest (v19) logic to do step number 1. If there's significant changes, this might not do the job.

60 should fix the issue, which I'll be working on shortly. Either way, an upgrade like this will require the UI/CLI exe to be updated, which I think will also solve your issue in the short term (updating your UI exe to v19)

JMPZ11 commented 3 months ago

It happens on both UI version - I think my description wasn't clear.

At least with Starfield, if the custom version field is populated at all, deserialization fails, as it uses the Skyrim translator. In UI 0.18.0 it happens when the custom option is selected, and it seemed to occur even if you had disabled the custom option but had not cleared the values first.

I should be able to get some steps to reproduce - I haven't been able to write out any 0.19.0 files so I don't know if the file version has an impact.

Let me know if you need anything to help reproduce. I really am just trying to help!

JMPZ11 commented 3 months ago

Ok, this isn't happenning in the new version anymore - no clue what was wrong but probably related to sleep. Closing.