Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line endings #3862

Closed
pepone opened this issue Dec 11, 2023 · 1 comment
Closed

Fix line endings #3862

pepone opened this issue Dec 11, 2023 · 1 comment
Assignees
Labels
bug Something isn't working task
Milestone

Comments

@pepone
Copy link
Member

pepone commented Dec 11, 2023

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 pepone added the task label Dec 11, 2023
@pepone pepone modified the milestones: 0.3.0, 0.2.1 Dec 11, 2023
@pepone pepone added the bug Something isn't working label Dec 12, 2023
@pepone
Copy link
Member Author

pepone commented Dec 12, 2023

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)

@pepone pepone self-assigned this Dec 12, 2023
pepone added a commit that referenced this issue Dec 12, 2023
- Set default to LF line endings for all text files
- Define CRLF line endings for .bat and .ps1 files
@pepone pepone closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working task
Projects
None yet
Development

No branches or pull requests

1 participant