bytecodealliance / wasmtime-dotnet

.NET embedding of Wasmtime https://bytecodealliance.github.io/wasmtime-dotnet/
Apache License 2.0
422 stars 51 forks source link

Fix Inconsistent Line Endings #203

Closed martindevans closed 1 year ago

martindevans commented 1 year ago

Since the T4 templates were introduced I've been getting warnings from Visual Studio/Unity about inconsistent line endings. This seems to be because the StringBuilder in FunctionCallbackOverloadTemplates.t4 is using \r\n (the correct line ending for Windows) but the t4 file itself is written with \n line endings.

For now I've modified the template to replace all generated \r\n with \n for consistency. But I'm not sure that's ultimately the right approach, can anyone suggest any better alternatives (e.g. can t4 be made to normalize things)?

martindevans commented 1 year ago

I'm not aware that I've changed that setting but it looks like it was set incorrectly for me. Thanks for pointing me in the right direction 👍