bscotch / stitch

Tools and apps for GameMaker development: a CLI for pipeline development, a VSCode extension for coding, and more.
Other
119 stars 13 forks source link

Stitch failing to open project - GMREffectLayer types #186

Closed AvioxArcade closed 11 months ago

AvioxArcade commented 11 months ago

Trying to set up and use stitch for the first time. When opening my current project, stitch fails to open with the following error:

ERROR 15:36:06.042 ERROR: Error reading file: c:/...[REDACTED].../rooms/room_main/room_main.yy
[
  {
    "code": "invalid_union_discriminator",
    "options": [
      "GMRInstanceLayer",
      "GMRBackgroundLayer",
      "GMRTileLayer",
      "GMRAssetLayer",
      "GMRPathLayer",
      "GMRLayer"
    ],
    "path": [
      "layers",
      0,
      "resourceType"
    ],
    "message": "Invalid discriminator value. Expected 'GMRInstanceLayer' | 'GMRBackgroundLayer' | 'GMRTileLayer' | 'GMRAssetLayer' | 'GMRPathLayer' | 'GMRLayer'"
  }
]

This is followed up with several more similar errors, but in my room_main.yy file, it looks like the error is from this section of code:

"layers": [
    {"resourceType":"GMREffectLayer", ...

Could simply be that Stitch doesn't support GMREffectLayer layer types.

Thanks

adam-coster commented 11 months ago

That is exactly the right diagnosis, thanks for the detailed report!

If you don't mind sharing, can you provide your room_main.yy file so I can use it as a sample in the Stitch test suite? That'll help me make sure I'm accounting for whatever data lives in that layer, since we ourselves don't use effect layers.

adam-coster commented 11 months ago

Should be resolved in version 1.55.8, whenever that update shows up in VSCode!

Your room's yy file that includes that layer type will still be useful, since this update just makes Stitch see that room type as "valid" but doesn't actually know anything else about it.

For reference, the spot in the code is here:

https://github.com/bscotch/stitch/blob/def9906e4b9a09c0f0a661f56d96f3ec4458c967/packages/yy/src/types/YyRoom.ts#L151-L155

AvioxArcade commented 11 months ago

Thanks! It looks like that was the only fix necessary for my project to open!

can you provide your room_main.yy file

Yes, of course! room_main.zip

Sorry about it being zipped. github won't let me upload .yy files directly.

adam-coster commented 11 months ago

No worries, that's perfect. Glad it worked!