MerlinVR / UdonSharp

An experimental compiler for compiling C# to Udon assembly
MIT License
678 stars 89 forks source link

Wrong end of line in udonAssembly in asset file #44

Closed YannPenven closed 4 years ago

YannPenven commented 4 years ago

Describe the bug in detail:

When using udonsharp on linux the code written in asset file isn't using the editor end of line style

Provide steps/code to reproduce the bug:

You need unity 2018.4.20f1 on linux.

Update any script file that was made on windows and the end of line in the udonAssembly part of the asset file will be replace by the local system end of line

*Expected behavior:

UdonSharp should use the unity end of line configuration

Screenshot_20200622_224139

MerlinVR commented 4 years ago

What file is the end of line in? The .cs source file, or the .asset program asset file? Are there any issues caused by the line endings?

YannPenven commented 4 years ago

What file is the end of line in?

In the asset file generated from the cs file

The .cs source file, or the .asset program asset file?

The .asset file, it only in the part containing a string nammed udonAssembly

Are there any issues caused by the line endings?

The issues is that it's creating a lot of change in a lot of file every time I'm compiling the project and with unity collab that mean i need to check every file do a rollback for most of them, change the \n to \r\n for some of them in order to avoid having conflict with the commit made by other dev in the team.

Edit : Original PlayerModSetter

Original-PlayerModSetter.asset.txt

After compilation PlayerModSetter

PlayerModSetter.asset.txt

MerlinVR commented 4 years ago

Thanks, I'll look at fixing this. Since it's just the intermediate uasm I think it'll be fine to keep the line endings consistent between platforms instead of needing to track down the Unity line ending setting for new scripts and use that.