ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.63k stars 487 forks source link

FSL bug: mcpp dependencies can be parsed incorrectly #271

Closed ivalylo closed 5 months ago

ivalylo commented 1 year ago

Hello,

When you have compiled the FSL files and try to run again, the check for file stamps produces error:


1>  File "C:\postal\The-Forge\Tools\ForgeShadingLanguage\VS\/fsl_vs_call_helper.py", line 36, in <module>
1>    sys.exit(main())
1>  File "C:\postal\The-Forge\Tools\ForgeShadingLanguage\fsl.py", line 74, in main
1>    if not needs_regen(args, dependency_filepath, platforms, regen, dependencies):
1>  File "C:\postal\The-Forge\Tools\ForgeShadingLanguage\utils.py", line 600, in needs_regen
1>    deps_timestamp = max([os.path.getmtime(filepath.strip()) for filepath in files])
1>  File "C:\postal\The-Forge\Tools\ForgeShadingLanguage\utils.py", line 600, in <listcomp>
1>    deps_timestamp = max([os.path.getmtime(filepath.strip()) for filepath in files])
1>  File "genericpath.py", line 55, in getmtime
1>OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:/postal/Postal/Shaders/shader_defs.h C:/postal/Postal/Shaders/packing.h'```

I tracked the issue to utils.py, where it assumes that mcpp will write each include name on different line. However, if the filenames are short enough, they are on the same line. 
wolfgangfengel commented 1 year ago

Thanks for bringing this to our attention. It will be fixed in the next release.

manas-kulkarni commented 5 months ago

Fixed with the latest release