PatchOperationTest / bug / misfeature / feature request

Started by CannibarRechter, September 09, 2017, 07:16:24 PM

Previous topic - Next topic

CannibarRechter

Hi, this is more of an incomplete implementation issue. When using PatchOperationTest, and there is an error in one of the patches, I get the (attached) error. It is not helpful. If you have a document with a larger number of sequence elements in it, it is rather difficult to figure out which one is broken. Can we have the xpath of the offending element included in the exception, please? Thank you.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

NeverPire

I have the impression you have forgotten to attach the mentioned error log.
I will never do worse than what I do now.
It's what self-improvement means.

ison


CannibarRechter

Hi. Sorry. I had it then, and I slipped. Here's the short of it, though:

Imagine you have a PatchOperation sequence, with a test, and a whole series of patch operations performing after passing the test. Don't set success to always. If one of the many patch operations fails, you can't tell which one. The failure message doesn't say. It's bad enough that you really shouldn't perform Sequences, as far as I can tell. Better to have a bunch of individual ones, with their own success settings and tests.

Unless I did something wrong.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

CannibarRechter

I finally had this happen again. Here you see a file with a very long series of tests and sequences fail. Which one, I might ask? Dunno. The output_log.txt file has no more information.

Patches have been great, but sequences have been bad for me for this reason.

[attachment deleted by admin: too old]
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

ison

Fixed, this is how the error will look like:

Quote[Core] Patch operation Verse.PatchOperationSequence(count=1, lastFailedOperation=Verse.PatchOperationReplace(*/ThingDef[defName = "PowerConduitInvisible"]/description2)) failed
file: C:\Users\ison\Documents\RimWorld\rimworld\Assets\Mods\Core\Patches\patches.xml

Thanks for reporting.