icerpc / icerpc-csharp

A C# RPC framework built for QUIC, with bidirectional streaming, first-class async/await, and Protobuf support.
https://docs.icerpc.dev
Apache License 2.0
108 stars 13 forks source link

Fix line endings #3862

Closed pepone closed 11 months ago

pepone commented 11 months ago

We should fix all text files to use LF line endings as per:

https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-wsl-resulting-in-many-modified-files

With the current settings, line endings are converted to the platform default on checkout, which causes problems with Visual Studio Code dev containers. If you try to open a local clone on a dev container the bash script used for building will not work because the extra \r

pepone commented 11 months ago

This affects the bash scripts included with IceRpc.Protobuf.Tools NuGet package, because we build the packages on a Windows VM.

@pepone ➜ .../icerpc-csharp/examples/protobuf/Greeter (db44cf29) $ dotnet build
An issue was encountered verifying workloads. For more information, run "dotnet workload update".
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  Restored /workspaces/icerpc-csharp/examples/protobuf/Greeter/Client/Client.csproj (in 9.95 sec).
  Restored /workspaces/icerpc-csharp/examples/protobuf/Greeter/Server/Server.csproj (in 9.95 sec).
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : /usr/bin/env: ‘bash\r’: No such file or directory [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Client/Client.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : --icerpc-csharp_out: protoc-gen-icerpc-csharp: Plugin failed with status code 127. [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Client/Client.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : /usr/bin/env: ‘bash\r’: No such file or directory [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Server/Server.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : --icerpc-csharp_out: protoc-gen-icerpc-csharp: Plugin failed with status code 127. [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Server/Server.csproj]

Build FAILED.

/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : /usr/bin/env: ‘bash\r’: No such file or directory [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Client/Client.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : --icerpc-csharp_out: protoc-gen-icerpc-csharp: Plugin failed with status code 127. [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Client/Client.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : /usr/bin/env: ‘bash\r’: No such file or directory [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Server/Server.csproj]
/home/vscode/.nuget/packages/icerpc.protobuf.tools/0.2.0.1/build/IceRpc.Protobuf.Tools.targets(39,9): error : --icerpc-csharp_out: protoc-gen-icerpc-csharp: Plugin failed with status code 127. [/workspaces/icerpc-csharp/examples/protobuf/Greeter/Server/Server.csproj]
    0 Warning(s)
    4 Error(s)