haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Expecto project template for VS Code not compatible with FAKE 5 #369

Closed ScottHutchinson closed 4 years ago

ScottHutchinson commented 4 years ago

I'm hoping to give a class on introduction to Expecto two days from now, but I'm off to a rather frustrating start.

I have the .NET Core SDK 3.1.100 installed on Windows. In the VS Code (1.41.1) command palette, I chose F#: New Project...Expecto.

When I run ./build.cmd, I get lots of warnings:

This runner is now obsolete with FAKE 5, please upgrade to the new .Net Core runner. See https://fake.build/fake-migrate-to-fake-5.html
To remove this warning you can append the '--removeLegacyFakeWarning' argument or set the 'FAKE_NO_LEGACY_WARNING' environment variable to 'true'
build.fsx(15,21): warning FS0044: This construct is deprecated. Please use nuget 'Fake.IO.FileSystem' and Fake.IO.Globbing.Operators instead
build.fsx(23,8): warning FS0044: This construct is deprecated. FAKE0001 Use the Fake.Core.Process module instead
build.fsx(35,9): warning FS0044: This construct is deprecated. FAKE0001 Use the Fake.Core.Process module instead
build.fsx(45,1): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Create)
build.fsx(46,5): warning FS0044: This construct is deprecated. Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Shell.CleanDirs)  
build.fsx(50,1): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Create)
build.fsx(58,1): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Create)
build.fsx(72,3): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.TargetOperators.(==>)
build.fsx(71,3): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.TargetOperators.(==>)
build.fsx(74,1): warning FS0044: This construct is deprecated. Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.runOrDefault)

Is there an open issue to update this template to get rid of all these warnings? Thanks!

haf commented 4 years ago

Hmm... @MNie Would you be up for upgrading FAKE in the template? Pretty please?

MNie commented 4 years ago

@haf yup I could do that ;)

MNie commented 4 years ago

@ScottHutchinson it seems that forge templates that are in code pallette in vs code are no longer supported or the plan is to drop support. The only option and the recommended one would be to create an F# project via the Dotnet template. You could achieve it like that:

dotnet new expecto -n PROJECT_NAME -o FOLDER_NAME -lang F#

If you are looking for some scaffold with Expecto inside you could take a look at this project. Which is also available as a Dotnet template:

dotnet new mini-scaffold -n MyCoolNewLib --githubUsername MyGithubUsername
ScottHutchinson commented 4 years ago

OK. I guess part of that Ionide issue should be to change the VS Code command palette command F#: New Project...Expecto to use dotnet new instead of the forge template.

haf commented 4 years ago

I'm closing this since it's not actionable from this project's perspective. Thank you @mnie for coming to our aid and explaining :)