SimulaVR / godot-haskell

Haskell bindings for GdNative
BSD 3-Clause "New" or "Revised" License
167 stars 16 forks source link

Project generator needs to provide better error messages. #35

Open YellowOnion opened 3 years ago

YellowOnion commented 3 years ago

Files are available here: https://docs.godotengine.org/en/stable/tutorials/3d/fps_tutorial/part_one.html

Regenerating ...
["game/Main.gdns"]
["game/Health_Pickup.tscn","game/Testing_Area.tscn","game/Broken_Target.tscn","game/Ammo_Pickup.tscn","game/Turret.tscn","game/Debug_Display.tscn","game/Target.tscn","game/Main.tscn","game/Pause_Popup.tscn","game/Sticky_Grenade.tscn","game/Simple_Audio_Player.tscn","game/Main_Menu.tscn","game/Grenade.tscn","game/Bullet_Scene.tscn","game/Player.tscn","game/assets/Ruin_Level_Objects/Debris.tscn","game/assets/Ruin_Level_Objects/Ruin_Level_Library_Scene.tscn","game/assets/Ruin_Level_Objects/Ruins_Level.tscn","game/assets/Ruin_Level_Objects/Debris_Pillar.tscn","game/assets/Gamemode_Objects/Banner_Red.tscn","game/assets/Gamemode_Objects/Gamemode_Flag_Red.tscn","game/assets/Gamemode_Objects/Gamemode_Skull.tscn","game/assets/Gamemode_Objects/Gamemode_Flag_Blue.tscn","game/assets/Gamemode_Objects/Banner_Blue.tscn","game/assets/Space_Level_Objects/Computer_Static.tscn","game/assets/Space_Level_Objects/Space_Level.tscn","game/assets/Space_Level_Objects/Barrel_Rigid_Body.tscn","game/assets/Space_Level_Objects/Pillar_Static.tscn","game/assets/Space_Level_Objects/Light_Static.tscn","game/assets/Space_Level_Objects/Space_Mesh_Library_Scene.tscn","game/assets/Space_Level_Objects/Crate_Rigid_Body.tscn","game/assets/Space_Level_Objects/Light_Tall_Static.tscn"]
godot-haskell-project-generator: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
  fromJust, called at project-generator/Main.hs:649:91 in main:Main
WinstonHartnett commented 3 years ago

I can't reproduce this. Is there anything else you can give?

YellowOnion commented 2 years ago

Looks like the project generator needs a matching gdns for all tcsn files.

YellowOnion commented 2 years ago

Never mind it's still absolutely pedantic:

stack exec godot-haskell-project-generator game src
Regenerating ...
["game/GUI.gdns","game/Player.gdns","game/World.gdns"]
["game/GUI.tscn","game/Player.tscn","game/World.tscn"]
godot-haskell-project-generator: project-generator/Main.hs:(661,20)-(664,38): Non-exhaustive patterns in case
YellowOnion commented 2 years ago

@abarbu @DavidEichmann it would be nice if this program actually had useful error messages.

YellowOnion commented 2 years ago

my assumption is that project-generator hates me using gdscript, if I want to use gdscript it breaks assumptions in how the project-generator parses the tscn and gdns files.

lboklin commented 2 years ago

I may have a fix for this, if indeed it's as I suspect because of scene instances marked as editable

YellowOnion commented 2 years ago

If I move Player.tscn, and Player.gdns to a different folder I can get it generate my project files, registerAll' doesn't work though, and I'm not sure why.

Here's the project: https://github.com/YellowOnion/fps-game

lboklin commented 2 years ago

Can you try it now with the latest commits?

YellowOnion commented 2 years ago

@lboklin I opened a pull request that fixes the issue :-)

lboklin commented 2 years ago

@YellowOnion That change was already made in the commits I've pushed

lboklin commented 2 years ago

Specifically 71df035791b3d5d7039ad5d4f63e4e71672e456d

YellowOnion commented 2 years ago

@lboklin Ahh okay you fixed it a different way I see.