jlaumon / AssetCooker

Asset Cooker is a build system aimed at game assets, for custom engines. It leverages Windows' USN journals to robustly track which files change, and only cook what needs to be cooked.
Mozilla Public License 2.0
219 stars 6 forks source link

Rewrite of of GNU Make-like depfile parsing. #4

Closed Eiyeron closed 4 days ago

Eiyeron commented 1 week ago

Hello.

I'm currently halfway writing the GNU Make/GCC-like dependency file parsing algorithm in order to fix #3.

It still needs more polish, more specifically code style and tests, but I could make it work with depfiles from softwares such as glslang (which does the same kind of depfile than glslc but properly escape file paths with spaces.

Have a nice day.

jlaumon commented 1 week ago

I didn't have time to really look into it tonight, but it asserted when parsing this file when I tried it (it's a dep file from DXC). brdf_integration.comp.zip

I need to add more tests! :)

Thanks a lot for your work, if you want I can also continue your branch tomorrow.

Eiyeron commented 1 week ago

You're welcome.

I saw your sample file, it made me dig up a bit more about path escaping: looks like glslang escapes only specific set of characters such as spaces or colon whereas my attempt didn't really do that, as seen here. sCleanupPath fails on your file because the backslashes are unescaped and thus eats all of them.

I sent a commit that should (and did while I was writing this answer) fail the test runner that should give a starting point for what to expect from this function once i'll be fixed. I'll have to look for the proper set of special characters to escape so I can improve the function.

Thanks a lot for your work, if you want I can also continue your branch tomorrow.

It's up to you. I'm still invested in making it work as best as I can be but if you feel like you'll be faster doing it instead, I guess I can leave that to you.

Thanks for your testing!

jlaumon commented 1 week ago

You're totally welcome to keep working on this if you want! I'm very glad you're doing that, just didn't want you to think you had to continue now that you've started 😂