ionide / forge-templates

F# Project and Solution Templates for Forge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a reason for having paket.exe in the .gitignore file?

s952163 opened this issue · comments

From ionide/ionide-vscode-fsharp#626

When cloning a repo that was bootstrapped in Ionide it will lack paket.exe. When trying to restore such a repo it will not find .paket\paket.exe and fail with the following error message:

[22:15:08 INFO ] MSBuild (.NET) found at C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
[22:15:08 INFO ] Dotnet cli (.NET Core) found at C:\Program Files\dotnet\dotnet.exe
[22:15:08 INFO ] Automatic msbuild detection
[22:15:13 INFO ] invoking msbuild from C:\Program Files\dotnet\dotnet.exe on "c:\Users~\Documents\Source\tmp\testpaketgit2\TestPaketGit\TestPaketGit\TestPaketGit.fsproj" for target Restore
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
'"c:\Users~\Documents\Source\tmp\testpaketgit2\TestPaketGit.paket\paket.exe"' is not recognized as an internal or external command,
operable program or batch file.

When creating a new F# Project in VSCode, Ionide bootstraps it with Fake and Paket. The current .gitignore file from gitignore.io has the following line in it: .paket/paket.exe. This results in excluding paket.exe when committing the project to a git repo like gitlab or GitHub.

Workaround:
Change it manually to !.paket/paket.exe to force the inclusion of paket.exe.

vbfox commented 10 hours ago
If the bootstrapper is used in magic mode (renamed paket.exe) then paket.exe shouldn't be excluded.
If it is used as a separate executable then paket.exe should be excluded as it's a big file that can (when version isn't pinned via version XXX in paket.dependencies file) change pretty often.
Maybe the default ionide template should use magic mode ?
👍 1

s952163 commented 9 hours ago
Maybe the default ionide template should use magic mode ?
That would be great. Currently I rename the bootstrapper manually to paket.exe.

Collaborator
enricosada commented 8 hours ago
@s952163 can you move this in https://github.com/fsharp-editing/Forge-templates ?
afaik template source is in https://github.com/fsharp-editing/forge-templates/blob/b1c0b07c9c5d221a783653fa2af92a6ac33a7847/.vcsignore/.gitignore#L385