Giter VIP home page Giter VIP logo

forge's People

Contributors

andredublin avatar aserogin avatar bartsokol avatar chrsteinert avatar cloudroutine avatar drvink avatar forki avatar fswalker avatar gitter-badger avatar inosik avatar jeroldhaas avatar jindraivanek avatar joncfoo avatar kerams avatar kragt avatar krzysztof-cieslak avatar lasandell avatar mangelmaxime avatar ncave avatar puffybsd avatar pver avatar reidev275 avatar richardjharding avatar rmunn avatar rojepp avatar samritchie avatar spencerwi avatar takemyoxygen avatar tarmil avatar vbfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forge's Issues

Single command for specific project/-type

What's the command to do

$ forge new project
suave

as a single command line?

The reason for asking is that the normal forge new --help nor forge new project --help gives docs on how to call it with a specified sort of project, and forge new project suave or forge new project type suave all fail to work.

So this issue can either be to

a) Document is with --help
b) document how to do it in the README, which is the second place I go
c) Support the 'guessed' variants.

Can't add files to project after all files have been removed

I notice when I create a new F# class lib project and then remove the ProjectName.fs and Script.fsx files from it, I can't then add new files to the project.

Expected Behavior

"Add files to project" should still add files to the project even if there are no files currently in the project.

Current Behavior

If all files are removed from the project, there's an empty ItemGroup tag in the .fsproj file that apparently can't any longer have entries added to it.

Possible Solution

If there's no ItemGroup to add a file to, look for an empty one and add it to that. If there isn't an empty one, add a new ItemGroup.

Steps to Reproduce (for bugs)

  1. Create a new F# class lib project.
  2. Remove the ProjectName.fs and Script.fsx files from the project.
  3. Create a new Foo.fs file
  4. Try to add Foo.fs to the project

Context

In general, when I create a new project I don't necessarily want ProjectName.fs and Script.fsx files at the top level. I like to create modules in subdirectories.

Your Environment

I'm using Ionide 2.23.7 on VS Code 1.10.1 (on macOS Sierra). It's unclear to me how Forge is integrated there or what version is used.

Order the unordered list

Expected Behavior

  1. classlib
  2. classlibcsharp
  3. console
  4. expecto
  5. fslabbasic
  6. fslabjournal
  7. fsunit
  8. nancyselfhosted
  9. pcl259
  10. servicefabrichost
  11. servicefabricsuavestateless
  12. suave
  13. suaveazurebootstrapper
  14. temp
  15. websharperserverclient
  16. websharperspa
  17. websharpersuave
  18. windows

So we could be able to write the index or the whole template's name.

Current Behavior

  • classlib
  • classlibcsharp
  • console
  • expecto
  • fslabbasic
  • fslabjournal
  • fsunit
  • nancyselfhosted
  • pcl259
  • servicefabrichost
  • servicefabricsuavestateless
  • suave
  • suaveazurebootstrapper
  • temp
  • websharperserverclient
  • websharperspa
  • websharpersuave
  • windows

Possible Solution

We can use an array to match the value.

Steps to Reproduce (for bugs)

  1. $ forge new project
  2. test
  3. .
  4. 'here we are'

Context

It will improve the ux.

Your Environment

Manjaro (but I dont think it is relevant here)

Forge 1.2.0 fails out of the box due to missing nett.dll

Trying to run forge --help from the unpacked 1.2.0 release zip results in the following exception. Seems like there's a dependency missing from the bundle (or a missing step about dependencies in the installation instructions).

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
   at Forge.Alias.parse(String path)
   at Forge.Alias.load()
   at Forge.Commands.applyAlias(String[] args)
   at Forge.Commands.strikeForge(String[] args, Result cont)
   at Forge.App.main(String[] argv)

Add above does not preserve the original file order

Expected Behavior

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="ReleaseNotes.fs" />
    <Compile Include="../Server/Shared/Domain.fs" />
    <Compile Include="Pages.fs" />
    <Compile Include="../Server/Shared/ServerUrls.fs" /> <!-- !!! -->
    <Compile Include="new.fs" />
    <Compile Include="Style.fs" />
    <Compile Include="Utils.fs" />
    <Compile Include="pages/Menu.fs" />
    <Compile Include="pages/Home.fs" />
    <Compile Include="pages/WishList.fs" />
    <Compile Include="pages/Login.fs" />
    <Compile Include="App.fs" />
  </ItemGroup>
  <Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>

Current Behavior

ServerUrls.fs changes position:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="ReleaseNotes.fs" />
    <Compile Include="../Server/Shared/Domain.fs" />
    <Compile Include="../Server/Shared/ServerUrls.fs" />  <!-- !!! -->
    <Compile Include="Pages.fs" />
    <Compile Include="new.fs" />
    <Compile Include="Style.fs" />
    <Compile Include="Utils.fs" />
    <Compile Include="pages/Menu.fs" />
    <Compile Include="pages/Home.fs" />
    <Compile Include="pages/WishList.fs" />
    <Compile Include="pages/Login.fs" />
    <Compile Include="App.fs" />
  </ItemGroup>
  <Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>

Steps to Reproduce (for bugs)

  1. Clone https://github.com/SAFE-Stack/SAFE-BookStore
  2. In the Project Explorer, right click on Style.fs and press Add file above, press enter.
  3. Open Client.fsproj and compare the current and expected behavior

Your Environment

  • Version used: The one in Ionide 3.6.0

new file command returns "Access to the path ... is denied" on windows

Expected Behavior

New file should be created and added reference to project

Current Behavior

file created and "Access to the path ... is denied" error returned

Steps to Reproduce (for bugs)

forge new project --name BlogWeb --dir BlogDir --template suave
forge new file --name server --project BlogDir --template fs
and output:

Forge should be run from solution/repository root. Please ensure you don't run it from folder containing other solutions

Do You want to continue? [Y/n]
Y
Unhandled error:
Access to the path 'C:\Users\d.tabakerov\FS\Blog\BlogDir' is denied.```

## Your Environment
Windows 10

Brew formula still on 1.3.3

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (F#, .Net):
  • Server type and version:
  • Operating System and version:

New Forge 2.0.0

So I am trying the new forge by running the following

forge new project -n test --folder src -t console

I get the following output

Generating project...
Creating /private/tmp/test/src/test
/usr/local/Cellar/forge/2.0.0/libexec/templates/console/App.config => /private/tmp/test/src/test/App.config
/usr/local/Cellar/forge/2.0.0/libexec/templates/console/ApplicationName.fs => /private/tmp/test/src/test/ApplicationName.fs
/usr/local/Cellar/forge/2.0.0/libexec/templates/console/ApplicationName.fsproj => /private/tmp/test/src/test/ApplicationName.fsproj
/usr/local/Cellar/forge/2.0.0/libexec/templates/console/paket.references => /private/tmp/test/src/test/paket.references
mono  "/private/tmp/test/.paket/paket.bootstrapper.exe"
Checking Paket version (downloading latest stable)...
Copying version 5.96.1 from cache.
Done in 2.51 second(s).
mono  "/private/tmp/test/.paket/paket.exe" init
Paket version 5.96.1
Saving file /private/tmp/test/paket.dependencies
/private/tmp/test/.paket/paket.targets
Downloading file from https://github.com/fsprojects/Paket/releases/download/5.96.1/paket.targets to /private/tmp/test/.paket/paket.targets
/private/tmp/test/.paket/paket.bootstrapper.exe
Downloading file from https://github.com/fsprojects/Paket/releases/download/5.96.1/paket.bootstrapper.exe to /private/tmp/test/.paket/paket.bootstrapper.exe
Performance:
 - Runtime: 6 seconds
mono  "/private/tmp/test/.paket/paket.exe" add FSharp.Core --no-resolve
Paket version 5.96.1
Adding FSharp.Core to /private/tmp/test/paket.dependencies into group Main
Dependencies files saved to /private/tmp/test/paket.dependencies
Performance:
 - Runtime: 1 second
mono  "/private/tmp/test/.paket/paket.exe" add FSharp.NET.Sdk --no-resolve
Paket version 5.96.1
Adding FSharp.NET.Sdk to /private/tmp/test/paket.dependencies into group Main
Dependencies files saved to /private/tmp/test/paket.dependencies
Performance:
 - Runtime: 1 second
mono  "/private/tmp/test/.paket/paket.exe" add FAKE --no-resolve
Paket version 5.96.1
Adding FAKE to /private/tmp/test/paket.dependencies into group Main
Dependencies files saved to /private/tmp/test/paket.dependencies
Performance:
 - Runtime: 2 seconds
mono  "/private/tmp/test/.paket/paket.exe" install
Paket version 5.96.1
Resolving packages for group Main:
 - FAKE 4.63.2
 - FSharp.Core 4.2.3
 - FSharp.NET.Sdk 1.0.5
 - FSharp.Compiler.Tools 4.1.23
Locked version resolution written to /private/tmp/test/paket.lock
Installing into projects:
 - Creating model and downloading packages.
 - src/test/paket.references -> src/test/test.fsproj
Performance:
 - Resolver: 29 seconds (1 runs)
    - Runtime: 275 milliseconds
    - Blocked (retrieving package details): 280 milliseconds (4 times)
    - Blocked (retrieving package versions): 29 seconds (2 times)
    - Not Blocked (retrieving package versions): 2 times
 - Disk IO: 2 seconds
 - Average Request Time: 1 second
 - Number of Requests: 20
 - Runtime: 33 seconds
Done!

Running the following:

./build.sh

I get

Cannot open assembly '.paket/paket.bootstrapper.exe': No such file or directory.

Removing that I get the following

Paket version 5.96.1
 - /private/tmp/test/src/test/obj/test.fsproj.net461.paket.resolved created
Performance:
 - Disk IO: 282 milliseconds
 - Runtime: 2 seconds
Building project with version: LocalBuild
Shortened DependencyGraph for Target Build:
<== Build
   <== Restore
      <== InstallDotNetCLI
         <== Clean

The running order is:
  - Clean
  - InstallDotNetCLI
  - Restore
  - Build
Running build with 1 worker
Starting Target: Clean
Creating /private/tmp/test/build/
Finished Target: Clean
Starting Target: InstallDotNetCLI (==> Clean)
dotnet --version
dotnetcli 2.0.0 already installed in PATH
Finished Target: InstallDotNetCLI
Starting Target: Restore (==> InstallDotNetCLI)
dotnet restore
  Restoring packages for /private/tmp/test/src/test/test.fsproj...
  Generating MSBuild file /private/tmp/test/src/test/obj/test.fsproj.nuget.g.props.
  Generating MSBuild file /private/tmp/test/src/test/obj/test.fsproj.nuget.g.targets.
  Restore completed in 215.23 ms for /private/tmp/test/src/test/test.fsproj.
Finished Target: Restore
Starting Target: Build (==> Restore)
dotnet build
/private/tmp/test/src/test/test.fsproj : error MSB4057: The target "Restore" does not exist in the project.
Running build failed.
Error:
System.Exception: dotnet build failed
  at [email protected] (System.String message) [0x00001] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Microsoft.FSharp.Core.PrintfImpl+StringPrintfEnv`1[TResult].Finalize () [0x00012] in <5893d081904cf4daa745038381d09358>:0
  at Microsoft.FSharp.Core.PrintfImpl+Final1@224[TState,TResidue,TResult,A].Invoke (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] env, A a) [0x00038] in <5893d081904cf4daa745038381d09358>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3253[T2,TResult,T1].Invoke (T2 u) [0x00001] in <5893d081904cf4daa745038381d09358>:0
  at FSI_0005.Build.runDotnet (System.String workingDir, System.String args) [0x00048] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at [email protected] (System.String p) [0x0000a] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Microsoft.FSharp.Collections.SeqModule.Iterate[T] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] action, System.Collections.Generic.IEnumerable`1[T] source) [0x0002d] in <5893d081904cf4daa745038381d09358>:0
  at [email protected] (Microsoft.FSharp.Core.Unit _arg4) [0x0000b] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Fake.TargetHelper+targetFromTemplate@209-1[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <59b649fdccf1c534a7450383fd49b659>:0
  at Fake.TargetHelper.runSingleTarget (Fake.TargetHelper+TargetTemplate`1[a] target) [0x0004b] in <59b649fdccf1c534a7450383fd49b659>:0

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target             Duration
------             --------
Clean              00:00:00.0039655
InstallDotNetCLI   00:00:00.4457008
Restore            00:00:02.4749389
Build              Failure
Total:             00:00:03.9929463
---------------------------------------------------------------------
Status:            Failure
---------------------------------------------------------------------
---------------------------------------------------------------------
  1) System.Exception: dotnet build failed
  at [email protected] (System.String message) [0x00001] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Microsoft.FSharp.Core.PrintfImpl+StringPrintfEnv`1[TResult].Finalize () [0x00012] in <5893d081904cf4daa745038381d09358>:0
  at Microsoft.FSharp.Core.PrintfImpl+Final1@224[TState,TResidue,TResult,A].Invoke (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] env, A a) [0x00038] in <5893d081904cf4daa745038381d09358>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3253[T2,TResult,T1].Invoke (T2 u) [0x00001] in <5893d081904cf4daa745038381d09358>:0
  at FSI_0005.Build.runDotnet (System.String workingDir, System.String args) [0x00048] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at [email protected] (System.String p) [0x0000a] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Microsoft.FSharp.Collections.SeqModule.Iterate[T] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] action, System.Collections.Generic.IEnumerable`1[T] source) [0x0002d] in <5893d081904cf4daa745038381d09358>:0
  at [email protected] (Microsoft.FSharp.Core.Unit _arg4) [0x0000b] in <7edbda6f2d7f46ae96e167e18465e45a>:0
  at Fake.TargetHelper+targetFromTemplate@209-1[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <59b649fdccf1c534a7450383fd49b659>:0
  at Fake.TargetHelper.runSingleTarget (Fake.TargetHelper+TargetTemplate`1[a] target) [0x0004b] in <59b649fdccf1c534a7450383fd49b659>:0
---------------------------------------------------------------------

Running the latest version

forge --version
2.0.0

does forge list files need the --solution parameter?

According to the help, you should be able to list the files of a solution:

image

But in the code, this parameter is not used:
image

So either the parameter should be removed from the help or it needs to be implemented.

How to add project to solution file?

I have an existing project that is not listed on .sln file.
I searched for something like forge add project -n src/MyProject/MyProject.fsproj -s MySolution.sln but could not find a way to do it.

Moving Forge to new brave world

I think it's high time to create Forge 2.0 that will move Forge templates to, and adds support for new fsproj files.

Actually I believe that changes in specification were pretty minimal, the only problem is that lot of things that were optional in specification are also now optional in reality (and we don't handle it because we had to follow VS requirements, not specification).

CC: @enricosada for more info about new fsprojs

Improve product positioning

Reading the Forge landing page, it is clear what forge does:

 Forge is a command line tool that provides tasks for creating and managing F# projects.

It is unclear why I'd use it.

The above sentence should continue with:

, unlike the 'dotnet' cli, Forge _______________

to make that clear.

Console template does not work with F#4.1 if Visual Studio is not installed

On a fresh install of Windows with F#4.1 the console template, that I use with Ionide, seems to not support F#4.1 when no Visual Studio is installed.
Creating a new project with Ionide "F#: New Project" and the console template works. But building it fails.

Expected Behavior

Build works

Current Behavior

Build fails with:

Fehler beim Buildvorgang.

       "C:\Users\chrst\Desktop\test2\Test2\Test2.fsproj" (Build Ziel) (1) ->
         C:\Users\chrst\Desktop\test2\Test2\Test2.fsproj : error MSB4057: Das Ziel "Build" ist im Projekt nicht vorhanden.

    0 Warnung(en)
    1 Fehler

(says Target "Build" is missing in German)

Possible Solution

The problem seems to be that the Microsoft.FSharp.Targets cannot be found.
In the fsproj file in the section where the FSharpTargetsPath is set I added basically the following:

<Otherwise>
  <PropertyGroup>
    <FSharpTargetsPath>$(FSHARPINSTALLDIR)\Microsoft.FSharp.Targets</FSharpTargetsPath>
  </PropertyGroup>
</Otherwise>

With this, the targets file can be found and the build succeeds.

Steps to Reproduce (for bugs)

On a fresh Windows 10 install:

  1. Install MSBuild 15
  2. Install F#4.1 (Step 4 of Option 4 on http://fsharp.org/use/windows/)
  3. Install VS Code with Ionide
  4. Execute Command "F#: New Project" - with the console template
  5. After everything is ready, execute build.cmd in the projects root folder.

Your Environment

Version used:

  • Windows 10
  • F# 4.1
  • .NET 4.6.2

What got me wondering; what is this line all about:
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">14</MinimumVisualStudioVersion>
It does not seem to have any influence in this setup.

I'll be happy to provide a fix for the template if this is wanted.

How to add a asset file to a project?

I wants add a data/Template.json to my project data/data.fsproj. But when I try to execute from solution root:

forge add file -p data/data.fsproj -n data/Template.json

I got compile error because Template.json is added with tag Compile. There is some way to add a non-compiling file to a project? (I mean, like a Template.json, which obviously is not a file to compile).

Like this:

  <Content Include="Template.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>

Instead

<Compile Include="Template.json/>

forge.sh is not using mono on linux

After I followed the manual installation instructions for linux, I tried to run forge to create a new project.
I got this:

src/Forge/temp/Forge.exe: cannot execute binary file: Exec format error

Expected Behavior

I would expect forge to just work. Is there a reason that forge.sh is not using mono when executing Forge.exe?

Current Behavior

The current forge.sh script is not using mono when executing Forge.exe

Possible Solution

diff --git a/forge.sh b/forge.sh              
index d98ace5..c9863d0 100644                 
--- a/forge.sh         
+++ b/forge.sh         
@@ -2,4 +2,4 @@        
 # User just ran a symbolic link which points to real Forge.exe                              
 # $0 is an absolute path of this symboliklink                                               
 # $* stands for all arguments passed to the command                                         
-"$(dirname $(readlink $0))/Forge.exe" $*     
+mono "$(dirname $(readlink $0))/Forge.exe" $* 

Steps to Reproduce (for bugs)

  1. Follow the manual installation instructions. (git clone and .build.sh)
  2. Symlink forge.sh into the $PATH
  3. Run forge
  4. Get error

Context

This issue didn't affect me too much, I just added mono to forge.sh. It would still be nice to not having to do that.

Your Environment

$mono --version
Mono JIT compiler version 5.8.0.127 (tarball Wed Feb 21 04:20:57 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)
$ fsharpc
Microsoft (R) F# Compiler version 4.1
Copyright (c) Microsoft Corporation. All Rights Reserved.

Running on Fedora27 x64

New Project Template for AWS Lambda

Expected Behavior

It should be simple to create a new project based on the template defined in the blog post F# on AWS Lambda. TL;DR The actual template is on Luke's Github.

Current Behavior

Without an AWS Lambda project template, one has to git clone Luke's template first, and then modify it as necessary.

Possible Solution

It doesn't seem to be too difficult to do? It looks like it's mainly a minimum of three files:

  • project.json
  • nuget.config
  • some initial code file

Context

I use AWS and I'm looking to expand my use of AWS to all of its available services, including AWS Lambda for quickly deploying API-backed scripts. AWS Lambda supports a few languages (NodeJS, Python, Java, C#/.NET Core), but I would really like to use F#. Thanks to Luke, he has shown it's possible—and I've confirmed through my own testing. I would simply like to make this use-case easy and accessible for others, as well as myself.

Your Environment

  • Windows 7
  • Ionide / VS Code
  • .NET Core 1.0.1

Unhandled Exception

Hi,

Running the command forge by itself in the command line produces the following

Unhandled Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Forge.Commands.applyAlias (System.String[] args) [0x00007] in <59b9172273406ffea74503832217b959>:0
  at Forge.Commands.runForge (System.String[] args) [0x00001] in <59b9172273406ffea74503832217b959>:0
  at Forge.App.main (System.String[] argv) [0x0007b] in <59b9172273406ffea74503832217b959>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Forge.Commands.applyAlias (System.String[] args) [0x00007] in <59b9172273406ffea74503832217b959>:0
  at Forge.Commands.runForge (System.String[] args) [0x00001] in <59b9172273406ffea74503832217b959>:0
  at Forge.App.main (System.String[] argv) [0x0007b] in <59b9172273406ffea74503832217b959>:0

Unhappy path

➜  repro-broken-mono brew install forge mono
Warning: samritchie/forge/forge 1.4.2 is already installed
Warning: mono 5.0.1.1 is already installed
➜  _scratch mkdir repro-broken-mono
➜  _scratch forge new project

Forge should be run from solution/repository root. Please ensure you don't run it from folder containing other solutions

Do You want to continue? [Y/n]
n
➜  _scratch cd repro-broken-mono
➜  repro-broken-mono forge new project
Getting templates...
Creating /usr/local/Cellar/forge/1.4.2/templates
git clone -b templates --single-branch https://github.com/fsharp-editing/Forge.git templates

Enter project name:
> Repro
Enter project directory (relative to working directory):
> .
Choose a template:
 - classlib
 - classlibcsharp
 - console
 - expecto
 - fslabbasic
 - fslabjournal
 - fsunit
 - nancyselfhosted
 - pcl259
 - servicefabrichost
 - servicefabricsuavestateless
 - suave
 - suaveazurebootstrapper
 - temp
 - websharperserverclient
 - websharperspa
 - websharpersuave
 - windows

> suave
Generating project...
Creating /Users/h/dev/_scratch/repro-broken-mono/Repro
/usr/local/Cellar/forge/1.4.2/libexec/../templates/suave/ApplicationName.fs => /Users/h/dev/_scratch/repro-broken-mono/./Repro/ApplicationName.fs
/usr/local/Cellar/forge/1.4.2/libexec/../templates/suave/ApplicationName.fsproj => /Users/h/dev/_scratch/repro-broken-mono/./Repro/ApplicationName.fsproj
/usr/local/Cellar/forge/1.4.2/libexec/../templates/suave/paket.references => /Users/h/dev/_scratch/repro-broken-mono/./Repro/paket.references
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.bootstrapper.exe"
Checking Paket version (downloading latest stable)...
Version 5.91.0 not found in cache.
Starting download from https://github.com/fsprojects/Paket/releases/download/5.91.0/paket.exe
Done.
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.exe" init
Paket version 5.91.0
Saving file /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies
/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.targets
Downloading file from https://github.com/fsprojects/Paket/releases/download/5.91.0/paket.targets to /Users/h/dev/_scratch/repro-broken-mono/.paket/paket.targets
/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.bootstrapper.exe
Downloading file from https://github.com/fsprojects/Paket/releases/download/5.91.0/paket.bootstrapper.exe to /Users/h/dev/_scratch/repro-broken-mono/.paket/paket.bootstrapper.exe
Performance:
 - Runtime: 6 seconds
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.exe" add nuget FSharp.Core --no-install
Paket version 5.91.0
Please use the new syntax: 'nuget' is the default argument and should be omitted.
Adding FSharp.Core to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies into group Main
Resolving packages for group Main:
 - FSharp.Core 4.2.3
 - System.IO 4.3.0
 - System.Linq 4.3.0
 - System.Linq.Expressions 4.3.0
 - System.Reflection 4.3.0
 - System.Runtime 4.3.0
 - System.Runtime.Extensions 4.3.0
 - System.Text.RegularExpressions 4.3.0
 - System.Collections 4.3.0
 - System.Diagnostics.Debug 4.3.0
 - System.Globalization 4.3.0
 - System.Net.Requests 4.3.0
 - System.Threading 4.3.0
 - System.Threading.Tasks 4.3.0
 - System.Threading.ThreadPool 4.3.0
 - System.Diagnostics.Tools 4.3.0
 - System.Linq.Queryable 4.3.0
 - System.Reflection.Extensions 4.3.0
 - System.Resources.ResourceManager 4.3.0
 - System.Runtime.Numerics 4.3.0
 - System.Threading.Tasks.Parallel 4.3.0
 - System.Threading.Timer 4.3.0
 - System.Console 4.3.0
 - System.Threading.Thread 4.3.0
 - System.Text.Encoding 4.3.0
 - System.ObjectModel 4.3.0
 - System.Reflection.Emit 4.3.0
 - System.Reflection.Emit.ILGeneration 4.3.0
 - System.Reflection.Emit.Lightweight 4.3.0
 - System.Reflection.Primitives 4.3.0
 - System.Reflection.TypeExtensions 4.4.0
 - System.Diagnostics.Tracing 4.3.0
 - System.Net.Http 4.3.2
 - System.Net.Primitives 4.3.0
 - System.Net.WebHeaderCollection 4.3.0
 - System.Collections.Concurrent 4.3.0
 - System.Runtime.Handles 4.3.0
 - Microsoft.NETCore.Platforms 2.0.0
 - Microsoft.NETCore.Targets 2.0.0
 - runtime.native.System 4.3.0
 - runtime.native.System.Net.Http 4.3.0
 - runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - System.Diagnostics.DiagnosticSource 4.4.1
 - System.Globalization.Extensions 4.3.0
 - System.IO.FileSystem 4.3.0
 - System.Runtime.InteropServices 4.3.0
 - System.Security.Cryptography.Algorithms 4.3.0
 - System.Security.Cryptography.Encoding 4.3.0
 - System.Security.Cryptography.OpenSsl 4.4.0
 - System.Security.Cryptography.Primitives 4.3.0
 - System.Security.Cryptography.X509Certificates 4.3.0
 - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - System.IO.FileSystem.Primitives 4.3.0
 - runtime.native.System.Security.Cryptography.Apple 4.3.0
 - System.Globalization.Calendars 4.3.0
 - System.Security.Cryptography.Cng 4.4.0
 - System.Security.Cryptography.Csp 4.3.0
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3.0
Locked version resolution written to /Users/h/dev/_scratch/repro-broken-mono/paket.lock
Dependencies files saved to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies
Performance:
 - Resolver: 30 seconds (1 runs)
    - Runtime: 1 second
    - Blocked (retrieving package details): 25 seconds (38 times)
    - Blocked (retrieving package versions): 3 seconds (3 times)
    - Not Blocked (retrieving package versions): 64 times
    - Not Blocked (retrieving package details): 29 times
 - Average Request Time: 773 milliseconds
 - Number of Requests: 205
 - Runtime: 32 seconds
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.exe" add nuget Suave --no-install
Paket version 5.91.0
Please use the new syntax: 'nuget' is the default argument and should be omitted.
Adding Suave to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies into group Main
Resolving packages for group Main:
 - FSharp.Core 4.2.3
 - Suave 2.2.1
 - System.Globalization.Extensions 4.3
 - System.Security.Cryptography.Primitives 4.3
 - System.IO 4.3
 - System.Linq 4.3
 - System.Linq.Expressions 4.3
 - System.Reflection 4.3
 - System.Runtime 4.3
 - System.Runtime.Extensions 4.3
 - System.Text.RegularExpressions 4.3
 - System.Data.Common 4.3.0
 - System.Diagnostics.Process 4.3.0
 - System.Collections 4.3
 - System.Diagnostics.Debug 4.3
 - System.Globalization 4.3
 - System.Net.Requests 4.3
 - System.Threading 4.3
 - System.Threading.Tasks 4.3
 - System.Threading.ThreadPool 4.3
 - System.Runtime.Serialization.Json 4.3.0
 - System.Diagnostics.Tools 4.3
 - System.Linq.Queryable 4.3
 - System.Reflection.Extensions 4.3
 - System.Resources.ResourceManager 4.3
 - System.Runtime.Numerics 4.3
 - System.Threading.Tasks.Parallel 4.3
 - System.Threading.Timer 4.3
 - System.Security.Claims 4.3.0
 - System.Console 4.3
 - System.Threading.Thread 4.3
 - System.Net.Security 4.3.1
 - NETStandard.Library 2.0.0
 - System.Net.Http 4.3.2
 - Microsoft.Win32.Primitives 4.3.0
 - System.AppContext 4.3.0
 - System.Collections.Concurrent 4.3
 - System.Diagnostics.Tracing 4.3
 - System.Globalization.Calendars 4.3
 - System.IO.Compression 4.3.0
 - System.IO.Compression.ZipFile 4.3.0
 - System.IO.FileSystem 4.3
 - System.IO.FileSystem.Primitives 4.3
 - System.Net.Primitives 4.3
 - System.Net.Sockets 4.3.0
 - System.ObjectModel 4.3
 - System.Reflection.Primitives 4.3
 - System.Runtime.Handles 4.3
 - System.Runtime.InteropServices 4.3
 - System.Runtime.InteropServices.RuntimeInformation 4.3.0
 - System.Security.Cryptography.Algorithms 4.3
 - System.Security.Cryptography.Encoding 4.3
 - System.Security.Cryptography.X509Certificates 4.3
 - System.Text.Encoding 4.3
 - System.Text.Encoding.Extensions 4.3.0
 - System.Xml.ReaderWriter 4.3.0
 - System.Xml.XDocument 4.3.0
 - Microsoft.Win32.Registry 4.4.0
 - runtime.native.System 4.3
 - System.Reflection.Emit 4.3
 - System.Reflection.Emit.ILGeneration 4.3
 - System.Reflection.Emit.Lightweight 4.3
 - System.Reflection.TypeExtensions 4.4
 - System.Net.WebHeaderCollection 4.3
 - runtime.native.System.Net.Security 4.3.0
 - runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - System.Security.Cryptography.OpenSsl 4.4
 - System.Security.Principal 4.3.0
 - System.Private.DataContractSerialization 4.3.0
 - Microsoft.NETCore.Platforms 2.0
 - Microsoft.NETCore.Targets 2.0
 - System.Security.AccessControl 4.4.0
 - System.Security.Principal.Windows 4.4.0
 - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.native.System.IO.Compression 4.3.0
 - System.Buffers 4.4.0
 - runtime.native.System.Net.Http 4.3
 - System.Diagnostics.DiagnosticSource 4.4.1
 - System.Runtime.Serialization.Primitives 4.3.0
 - System.Xml.XmlDocument 4.3.0
 - System.Xml.XmlSerializer 4.3.0
 - runtime.native.System.Security.Cryptography.Apple 4.3
 - System.Security.Cryptography.Cng 4.4
 - System.Security.Cryptography.Csp 4.3
 - System.Threading.Tasks.Extensions 4.4.0
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3
Locked version resolution written to /Users/h/dev/_scratch/repro-broken-mono/paket.lock
Dependencies files saved to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies
Performance:
 - Resolver: 30 seconds (1 runs)
    - Runtime: 11 seconds
    - Blocked (retrieving package details): 14 seconds (37 times)
    - Blocked (retrieving package versions): 4 seconds (8 times)
    - Not Blocked (retrieving package details): 58 times
    - Not Blocked (retrieving package versions): 87 times
 - Average Request Time: 836 milliseconds
 - Number of Requests: 160
 - Runtime: 32 seconds
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.exe" install
Paket version 5.91.0
Skipping resolver for group Main since it is already up-to-date
/Users/h/dev/_scratch/repro-broken-mono/paket.lock is already up-to-date
Installing into projects:
 - Creating model and downloading packages.
Downloading FSharp.Core 4.2.3
Downloading Suave 2.2.1
Downloading System.Security.Cryptography.OpenSsl 4.4
 - Repro/paket.references -> Repro/Repro.fsproj
Performance:
 - Disk IO: 7 seconds
 - Average Download Time: 10 seconds
 - Number of downloads: 3
 - Average Request Time: 1 second
 - Number of Requests: 3
 - Runtime: 20 seconds
/Library/Frameworks/Mono.framework/Commands/mono  "/Users/h/dev/_scratch/repro-broken-mono/.paket/paket.exe" add nuget FAKE
Paket version 5.91.0
Please use the new syntax: 'nuget' is the default argument and should be omitted.
Adding FAKE to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies into group Main
Resolving packages for group Main:
 - FAKE 4.63.0
 - FSharp.Core 4.2.3
 - Suave 2.2.1
 - System.Globalization.Extensions 4.3
 - System.Security.Cryptography.Primitives 4.3
 - System.IO 4.3
 - System.Linq 4.3
 - System.Linq.Expressions 4.3
 - System.Reflection 4.3
 - System.Runtime 4.3
 - System.Runtime.Extensions 4.3
 - System.Text.RegularExpressions 4.3
 - System.Data.Common 4.3
 - System.Diagnostics.Process 4.3
 - System.Collections 4.3
 - System.Diagnostics.Debug 4.3
 - System.Globalization 4.3
 - System.Net.Requests 4.3
 - System.Threading 4.3
 - System.Threading.Tasks 4.3
 - System.Threading.ThreadPool 4.3
 - System.Runtime.Serialization.Json 4.3
 - System.Diagnostics.Tools 4.3
 - System.Linq.Queryable 4.3
 - System.Reflection.Extensions 4.3
 - System.Resources.ResourceManager 4.3
 - System.Runtime.Numerics 4.3
 - System.Threading.Tasks.Parallel 4.3
 - System.Threading.Timer 4.3
 - System.Security.Claims 4.3
 - System.Console 4.3
 - System.Threading.Thread 4.3
 - System.Net.Security 4.3.1
 - NETStandard.Library 2.0
 - System.Net.Http 4.3.2
 - Microsoft.Win32.Primitives 4.3
 - System.AppContext 4.3
 - System.Collections.Concurrent 4.3
 - System.Diagnostics.Tracing 4.3
 - System.Globalization.Calendars 4.3
 - System.IO.Compression 4.3
 - System.IO.Compression.ZipFile 4.3
 - System.IO.FileSystem 4.3
 - System.IO.FileSystem.Primitives 4.3
 - System.Net.Primitives 4.3
 - System.Net.Sockets 4.3
 - System.ObjectModel 4.3
 - System.Reflection.Primitives 4.3
 - System.Runtime.Handles 4.3
 - System.Runtime.InteropServices 4.3
 - System.Runtime.InteropServices.RuntimeInformation 4.3
 - System.Security.Cryptography.Algorithms 4.3
 - System.Security.Cryptography.Encoding 4.3
 - System.Security.Cryptography.X509Certificates 4.3
 - System.Text.Encoding 4.3
 - System.Text.Encoding.Extensions 4.3
 - System.Xml.ReaderWriter 4.3
 - System.Xml.XDocument 4.3
 - Microsoft.Win32.Registry 4.4
 - runtime.native.System 4.3
 - System.Reflection.Emit 4.3
 - System.Reflection.Emit.ILGeneration 4.3
 - System.Reflection.Emit.Lightweight 4.3
 - System.Reflection.TypeExtensions 4.4
 - System.Net.WebHeaderCollection 4.3
 - runtime.native.System.Net.Security 4.3
 - runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - System.Security.Cryptography.OpenSsl 4.4
 - System.Security.Principal 4.3
 - System.Private.DataContractSerialization 4.3
 - Microsoft.NETCore.Platforms 2.0
 - Microsoft.NETCore.Targets 2.0
 - System.Security.AccessControl 4.4
 - System.Security.Principal.Windows 4.4
 - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.1
 - runtime.native.System.IO.Compression 4.3
 - System.Buffers 4.4
 - runtime.native.System.Net.Http 4.3
 - System.Diagnostics.DiagnosticSource 4.4.1
 - System.Runtime.Serialization.Primitives 4.3
 - System.Xml.XmlDocument 4.3
 - System.Xml.XmlSerializer 4.3
 - runtime.native.System.Security.Cryptography.Apple 4.3
 - System.Security.Cryptography.Cng 4.4
 - System.Security.Cryptography.Csp 4.3
 - System.Threading.Tasks.Extensions 4.4
 - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3
Locked version resolution written to /Users/h/dev/_scratch/repro-broken-mono/paket.lock
Dependencies files saved to /Users/h/dev/_scratch/repro-broken-mono/paket.dependencies
 - Creating model and downloading packages.
 - Repro/paket.references -> Repro/Repro.fsproj
Performance:
 - Resolver: 47 seconds (1 runs)
    - Runtime: 7 seconds
    - Blocked (retrieving package details): 6 seconds (46 times)
    - Blocked (retrieving package versions): 33 seconds (9 times)
    - Not Blocked (retrieving package details): 50 times
    - Not Blocked (retrieving package versions): 87 times
 - Disk IO: 11 seconds
 - Average Request Time: 1 second
 - Number of Requests: 113
 - Runtime: 1 minute, 6 seconds
Done!
➜  repro-broken-mono ./build.sh
Paket version 5.91.0
Performance:
 - Disk IO: 651 milliseconds
 - Runtime: 2 seconds
Building project with version: LocalBuild
Shortened DependencyGraph for Target Build:
<== Build
   <== Clean

The running order is:
  - Clean
  - Build
Running build with 1 worker
Starting Target: Clean
Creating /Users/h/dev/_scratch/repro-broken-mono/build/
Creating /Users/h/dev/_scratch/repro-broken-mono/deploy/
Finished Target: Clean
Starting Target: Build (==> Clean)
Building project: /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj
  /usr/local/bin/xbuild  /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj /t:Build    /p:RestorePackages="False" /p:OutputPath="/Users/h/dev/_scratch/repro-broken-mono/build" /p:Configuration="Debug" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/h/dev/_scratch/repro-broken-mono/packages/FAKE/tools/FakeLib.dll"

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 5.0.1.1
Copyright (C) 2005-2013 Various Mono authors

Build started 8/27/2017 12:48:20 PM.
__________________________________________________
/Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj: error : /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj: Object reference not set to an instance of an object
Build FAILED.
Errors:

/Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj: error : /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj: Object reference not set to an instance of an object

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:00.1436940
Running build failed.
Error:
Building /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj failed with exitcode 1.

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target     Duration
------     --------
Clean      00:00:00.0036510
Build      Failure
Total:     00:00:01.5448234
---------------------------------------------------------------------
Status:    Failure
---------------------------------------------------------------------
---------------------------------------------------------------------
  1) Building /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj failed with exitcode 1.
  2) : /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj(0,0): /Users/h/dev/_scratch/repro-broken-mono/Repro/Repro.fsproj: Object reference not set to an instance of an object

Can't restore with forge paket restore

After creating a new project with forge, checking it out to git and then
checking it out again in a different location (same computer, so same mono version) I'm unable to run forge paket restore

Expected Behavior

Current Behavior

oivvio@blomma  forge paket restore
mono  "/tmp/minisuave/.paket/paket.bootstrapper.exe" 
Cannot open assembly '/tmp/minisuave/.paket/paket.bootstrapper.exe': No such file or directory.
Error while running '/tmp/minisuave/.paket/paket.bootstrapper.exe' with args: 
mono  "/tmp/minisuave/.paket/paket.exe" restore
Cannot open assembly '/tmp/minisuave/.paket/paket.exe': No such file or directory.
Error while running '/tmp/minisuave/.paket/paket.exe' with args: restore

Possible Solution

I guess there's a step I need to run before running forge paket restore to install paket in the project.

I tried forge update-version paket but that gives me

mono  "/tmp/minisuave/.paket/paket.bootstrapper.exe" 
Cannot open assembly '/tmp/minisuave/.paket/paket.bootstrapper.exe': No such file or directory.
Error while running '/tmp/minisuave/.paket/paket.bootstrapper.exe' with args:

Your Environment

  • Version used:

Forge 1.4.1

  • Environment name and version (F#, .Net):

Mono JIT compiler version 5.0.0

  • Operating System and version:

Ubuntu 16.04

Forge does not create working projects under Linux

When working in Linux I get lot's of "Input string was not in a correct format" when working with forge.

You can reproduce with:

forge new project -t console -n ForgeTest --folder ForgeTest

this outputs on my machine:

Forge should be run from solution/repository root. Please ensure you don't run it from folder containing other solutions

Do You want to continue? [Y/n]

Generating project...
Creating /coding/ForgeTest/ForgeTest
/coding/Languages/Fsharp/Forge/temp/bin/../templates/console/App.config => /coding/ForgeTest/ForgeTest/App.config
/coding/Languages/Fsharp/Forge/temp/bin/../templates/console/ApplicationName.fs => /coding/ForgeTest/ForgeTest/ApplicationName.fs
/coding/Languages/Fsharp/Forge/temp/bin/../templates/console/ApplicationName.fsproj => /coding/ForgeTest/ForgeTest/ApplicationName.fsproj
/coding/Languages/Fsharp/Forge/temp/bin/../templates/console/paket.references => /coding/ForgeTest/ForgeTest/paket.references
mono  "/coding/.paket/paket.exe" init
Paket version 4.8.7
Saving file /coding/paket.dependencies
/coding/.paket/paket.targets
Downloading file from https://github.com/fsprojects/Paket/releases/download/4.8.7/paket.targets to /coding/.paket/paket.targets
4 seconds - ready.
mono  "/coding/.paket/paket.exe" add nuget FSharp.Core --no-install
Ignoring the following unknown argument(s): nuget, FSharp.Core, --no-install
Checking Paket version (version add requested)...
Input string was not in a correct format. (Github - cached)
mono  "/coding/.paket/paket.exe" install
Checking Paket version (version install requested)...
Input string was not in a correct format. (Github - cached)
mono  "/coding/.paket/paket.exe" add nuget FAKE
Ignoring the following unknown argument(s): nuget, FAKE
Checking Paket version (version add requested)...
Input string was not in a correct format. (Github - cached)
Done!

Expected Behavior

get a working console project

Current Behavior

get the same kind of errors when doing a ./build.sh

Your Environment

Mono 5.0.1.1
F# 4.1

dotnet-core:

Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1

Runtime Environment:
OS Name: linuxmint
OS Version: 18.1
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/1.0.1

`forge` does't work on (my) OSX Sierra

My Environment

OSX Sierra

> brew info forge                                                                             master [6e0fed4]
samritchie/forge/forge: stable 1.2.0
Forge (Command line tool for creating F# Projects)
https://forge.run
/usr/local/Cellar/forge/1.2.0 (7 files, 2.8M) *
  Built from source on 2016-11-29 at 21:39:26
From: https://github.com/samritchie/homebrew-forge/blob/master/forge.rb
==> Dependencies
Required: mono ✔

>mono --version                                                                              master [6e0fed4]
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Tue Nov 22 22:06:40 GMT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen

When I run forge I got the following errror

> forge -h                                                                                    master [6e0fed4]
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <5839973d73406ffea74503833d973958>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <5839973d73406ffea74503833d973958>:0

the same error I get with the Ionide bundles version

> mono ~/.vscode/extensions/Ionide.Ionide-fsharp-2.11.1/bin_forge/Forge.exe -h                master [6e0fed4]

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <58399aa373406ffea7450383a39a3958>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <58399aa373406ffea7450383a39a3958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <58399aa373406ffea7450383a39a3958>:0

Forge fails on Ubuntu Linux 16.4 LTS (System.BadImageFormatException: Could not resolve field token 0x04000008)

Forge fails with the following error

$ forge --help

Unhandled Exception:
System.BadImageFormatException: Could not resolve field token 0x04000008
File name: 'Forge'
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x04000008
File name: 'Forge'

Possible Solution

Steps to Reproduce (for bugs)

  1. Install using linuxbrew, according to README.md instructions.
  2. It fails right away.

Context

Your Environment

  • Version used: stable 2.0.0
  • Environment name and version (F#, .Net): mono 5.0.1.1
  • Operating System and version: Ubuntu 16.4 LTS Desktop

Important note: It also fails if I use the mono version (5.2.x) I get with these instructions: http://www.mono-project.com/download/#download-lin

The same problem occurs if I compile from source...

New project target incompatible with mono

When I use "forge new project", then generated project targets .Net v4.6.2.
I get compiler warnings that it is incompatible with mono.

warning : TargetFrameworkVersion 'v4.6.2' not supported by this toolset (ToolsVersion: 14.0)
If I change the target to v4.5, I stop getting the warnings.
I am working on El Capitan, mono is v4.8.0, forge v1.3.3

The `add reference` command still requires the manual adding of a HintPath tag for the build to be successful

Expected Behavior

What I expect after I use a command like:

forge add reference -n Some.Reference -p src/SampleProj/SampleProj.fsproj

is that the build will be successful, because I added the missing references.

Current Behavior

The build still fails because the added references could not be resolved.

Possible Solution

I'm not sure what to propose as solution. Nevertheless, the following did achieve the desired output:

  • Manually adding a HintPath tag for the new reference in the fsproj file solves the problem.

  • Also, for instance, if, instead of using the add reference command as above, I do

echo "Some.Reference" >> src/SampleProj/paket.references
mono .paket/paket.exe add -i nuget Some.Reference

then, the reference is added with a HintPath and the build is sucessful.

Context

I was trying to setup a Websharper project.

$ forge new project --name MyProject --folder . --template websharperserverclient

$ forge add file -p MyProject/MyProject.fsproj -n MyProject/RunServer.fs

$ cat <<EOF > MyProject/RunServer.fs
namespace MyProject

module SelfHostedServer =

    open global.Owin
    open Microsoft.Owin.Hosting
    open Microsoft.Owin.StaticFiles
    open Microsoft.Owin.FileSystems
    open WebSharper.Owin

    [<EntryPoint>]
    let Main args =
        let rootDirectory, url =
            match args with
            | [| rootDirectory; url |] -> rootDirectory, url
            | [| url |] -> "..", url
            | [| |] -> "..", "http://localhost:9000/"
            | _ -> eprintfn "Usage: WsSimple ROOT_DIRECTORY URL"; exit 1
        use server = WebApp.Start(url, fun appB ->
            appB.UseStaticFiles(
                    StaticFileOptions(
                        FileSystem = PhysicalFileSystem(rootDirectory)))
                .UseSitelet(rootDirectory, Site.Main)
            |> ignore)
        stdout.WriteLine("Serving {0}", url)
        stdin.ReadLine() |> ignore
        0
EOF

And then add reference for the 3 missing dependencies.

Your Environment

  • Version used:
    • Built from source, version 1.3.2
  • Environment name and version (F#, .Net):
    • F# 4.0 (Open Source Edition)
    • Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
  • Operating System and version:
    • Xubuntu 16.04.1

build.sh created with Windows line endings

I'm on macOS Sierra using Forge through Ionide. Just generated a new project and the build.sh has Windows line endings.

Expected Behavior

Running build.sh at the command line should not produce errors.

Current Behavior

Running build.sh fails with "build.sh: line 34: syntax error: unexpected end of file"

Possible Solution

Diffing the build.sh against another (working) project I generated just a few days ago shows that the only difference in build.sh is that the non-working one has CRLF line endings.

Steps to Reproduce (for bugs)

  1. In VS Code 1.10.1 with Ionide 2.23.9, Ionide-FAKE 1.2.3 and Ionide-Paket 1.6.3 open the directory that will be the root folder of the project.
  2. In the command palette, use the "F#: New Project" command, select a classlib, the directory src, and a name for the project.
  3. Wait a bit for the build files to be generated.
  4. Open build.sh in the editor. The editor mode will be CRLF. (This can also be verified using other tools.)
  5. Try using the command "FAKE: Build Default"; the command will fail with a syntax error.

Context

Can't run builds without changing the line endings of the file.

Your Environment

  • Version used: Unclear how to determine what version is in Ionide 2.23.9
  • Environment name and version (F#, .Net): mono 4.4.0, F# 4.0
  • Operating System and version: macOS Sierra

forge update -h causes error

Expected Behavior

According to the help: update: <paket|fake> Updates Paket or FAKE

typing 'forge update -h' should show the options 'Fake' and 'Paket'
typing 'forge update fake' should update Fake
typing 'forge update paket' should update Paket

Current Behavior

image

Your Environment

  • Version used: 1.3.1
  • Operating System and version: Windows 10

Publish a .dll on NuGet too?

IIUC, forge is today only published as a command line utility. Would it be possible and/or desirable to publish a library to NuGet, in addition to the CLI tool published today, which exposes the same functionality?

The use case would be for tools like https://github.com/fsprojects/Mechanic to not have to re-implement the fsproj parsing and patching features, but rather just call Forge for that.

(Of course, that could be done anyway, but it would require shelling out to start a separate process for each command, which obviously would be much slower...)

build.sh has default Windows line endings (^M)

build.sh generated by the console template has ^M windows line endings, which prevents the shell script from running on OSX/UNIX.

Upon further investigation the file at temp/templates/.fake/build.sh does not have the line endings problem!

Could it be due to the copy operation being performed by mono Forge.exe? I found this problem when using the ionide/vscode F# New Project command

Add "framework: >= net461" etc. to paket.dependencies where possible

If forge added

framework: >= net461

to top of the generated paket.dependencies for the .NET Framework templates then all the Paket resolution steps would be way faster. After adding this we get:

C:\GitHub\misc\t1>.paket\paket.exe update
Paket version 5.4.0
Resolving packages for group Main:
 - FAKE 4.62.1
 - FSharp.Core 4.2.1
 - FSharp.NET.Sdk 1.0.5
 - FSharp.Compiler.Tools 4.1.17
Locked version resolution written to C:\GitHub\misc\t1\paket.lock
Garbage collecting Microsoft.NETCore.Platforms
Garbage collecting Microsoft.NETCore.Targets
Garbage collecting runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.native.System
Garbage collecting runtime.native.System.Net.Http
Garbage collecting runtime.native.System.Security.Cryptography.Apple
Garbage collecting runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple
Garbage collecting runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl
Garbage collecting System.Collections
Garbage collecting System.Collections.Concurrent
Garbage collecting System.Console
Garbage collecting System.Diagnostics.Debug
Garbage collecting System.Diagnostics.DiagnosticSource
Garbage collecting System.Diagnostics.Tools
Garbage collecting System.Diagnostics.Tracing
Garbage collecting System.Globalization
Garbage collecting System.Globalization.Calendars
Garbage collecting System.Globalization.Extensions
Garbage collecting System.IO
Garbage collecting System.IO.FileSystem
Garbage collecting System.IO.FileSystem.Primitives
Garbage collecting System.Linq
Garbage collecting System.Linq.Expressions
Garbage collecting System.Linq.Queryable
Garbage collecting System.Net.Http
Garbage collecting System.Net.Primitives
Garbage collecting System.Net.Requests
Garbage collecting System.Net.WebHeaderCollection
Garbage collecting System.ObjectModel
Garbage collecting System.Reflection
Garbage collecting System.Reflection.Emit
Garbage collecting System.Reflection.Emit.ILGeneration
Garbage collecting System.Reflection.Emit.Lightweight
Garbage collecting System.Reflection.Extensions
Garbage collecting System.Reflection.Primitives
Garbage collecting System.Reflection.TypeExtensions
Garbage collecting System.Resources.ResourceManager
Garbage collecting System.Runtime
Garbage collecting System.Runtime.Extensions
Garbage collecting System.Runtime.Handles
Garbage collecting System.Runtime.InteropServices
Garbage collecting System.Runtime.Numerics
Garbage collecting System.Security.Cryptography.Algorithms
Garbage collecting System.Security.Cryptography.Cng
Garbage collecting System.Security.Cryptography.Csp
Garbage collecting System.Security.Cryptography.Encoding
Garbage collecting System.Security.Cryptography.OpenSsl
Garbage collecting System.Security.Cryptography.Primitives
Garbage collecting System.Security.Cryptography.X509Certificates
Garbage collecting System.Text.Encoding
Garbage collecting System.Text.RegularExpressions
Garbage collecting System.Threading
Garbage collecting System.Threading.Tasks
Garbage collecting System.Threading.Tasks.Parallel
Garbage collecting System.Threading.Thread
Garbage collecting System.Threading.ThreadPool
Garbage collecting System.Threading.Timer
Performance:
 - Resolver: 2 seconds (1 runs)
    - Runtime: 180 milliseconds
    - Blocked (retrieving package details): 110 milliseconds (4 times)
    - Blocked (retrieving package versions): 2 seconds (2 times)
    - Not Blocked (retrieving package versions): 2 times
 - Disk IO: 53 milliseconds
 - Average Request Time: 1 second
 - Number of Requests: 12
 - Runtime: 6 seconds

then paket update gives just:

C:\GitHub\misc\t1>.paket\paket.exe update
Paket version 5.4.0
Resolving packages for group Main:
 - FAKE 4.62.1
 - FSharp.Core 4.2.1
 - FSharp.NET.Sdk 1.0.5
 - FSharp.Compiler.Tools 4.1.17
C:\GitHub\misc\t1\paket.lock is already up-to-date
Performance:
 - Resolver: 1 second (1 runs)
    - Runtime: 195 milliseconds
    - Blocked (retrieving package details): 112 milliseconds (4 times)
    - Blocked (retrieving package versions): 1 second (3 times)
    - Not Blocked (retrieving package versions): 1 times
 - Disk IO: 49 milliseconds
 - Average Request Time: 639 milliseconds
 - Number of Requests: 11
 - Runtime: 3 seconds

(Mac) Homebrew install fails with: <<-EOS.undent is disabled!

I have tried to install Forge using homebrew as described in the readme, however, I get an unexpected error which is:

Error: Calling <<-EOS.undent is disabled! Use <<~EOS instead. /usr/local/Homebrew/Library/Taps/samritchie/homebrew-forge/forge.rb:15:in `install' Please report this to the samritchie/forge tap! Or, even better, submit a PR to fix it!

Any ideas on how to fix this issue?

Cheers.

Specs:
Macbook Pro 2012: High Sierra (10.13.3 )
Homebrew: 1.6.2

Implement list projects command

Implement 'forge list projects'

projects : List projects in solution
Available parameters:

    --solution [-s] <string>: List the projects in this solution
    --folder [dir|--dir] <string>: List the projects in this directory
    --filter <string>: Filter list via fuzzy search for this string

Shell script missing for manual Linux installation

Expected Behavior

According to documentation in README.md file, after making a symbolic link:

ln -s `pwd`/temp/forge.sh $INSTALL_DIR/forge

the user should be able to run forge.

Current Behavior

User cannot run forge due to lacking .sh file.

Possible Solution

I prepared a shell script which solves the issue, however it needs to be reviewed.
Please, expect a PR very soon.

Steps to Reproduce (for bugs)

Just follow precisely all steps for manual Linux installation section as described in the README.md file.

Context

Your Environment

  • Version used: 2.1.0
  • Environment name and version (F#, .Net):
    Mono JIT compiler version 5.4.0.201 (tarball Fri Oct 13 21:56:25 UTC 2017)
    Microsoft (R) F# Compiler version 4.1
  • Server type and version:
  • Operating System and version:
    Distributor ID: Zorin
    Description: Zorin OS 12.2
    Release: 12
    Codename: xenial

Non-executable `build.sh` generated

When running forge new project --name Api --folder ./Api --template suave, a file called build.sh is created, but its flags don't include the executable bit. It should, because it should be possible to build directly after creating the project without knowing how to use chmod on Unix systems.

new project -> paket init removes paket.exe file

Using Mono, Ubuntu 14.04, trunk Forge (2017-03-15)

I'm seeing inconsistent behavior when generating new projects in the same directory. I'm using the same template both times (console).

The first install copies the template directory, then copies the .paket directory from my Forge/temp/templates install dir and runs mono "/home/ARBFUND/dannygeorge/code/fsharp/ForgeJunk/.paket/paket.exe" init This command works but then the commands following are looking for .paket/paket.bootstrapper.exe and .paket/paket.exe which do not exist and the commands fail.

If I then generate the second project it copies the missing files from the Forge/temp/templates/.paket, but skips the paket.exe init command because the paket.dependencies file exists. The following commands then complete successfully.

Running the commands by hand - I'm seeing that the paket init command is removing the paket.exe file from the .paket directory.

### manually copied .paket directory from Forge
DgJunk git:(master) ✗ tree -a -I .git
.
├── DgCli
│   ├── App.config
│   ├── DgCli.fs
│   ├── DgCli.fsproj
│   └── paket.references
├── .gitignore
└── .paket
    ├── paket.exe
    └── paket.exe.config

2 directories, 7 files

### running paket.exe init
 DgJunk git:(master) ✗ mono  ".paket/paket.exe" init 
Paket version 4.0.1           
Saving file /home/ARBFUND/dannygeorge/code/fsharp/DgJunk/paket.dependencies
/home/ARBFUND/dannygeorge/code/fsharp/DgJunk/.paket/paket.targets
Downloading file from https://github.com/fsprojects/Paket/releases/download/4.0.1/paket.targets to /home/ARBFUND/dannygeorge/code/fsharp/DgJunk/.paket/paket.targets
1 second - ready.
 
### paket.exe now missing
DgJunk git:(master) ✗ tree -a -I .git              
.
├── DgCli
│   ├── App.config
│   ├── DgCli.fs
│   ├── DgCli.fsproj
│   └── paket.references
├── .gitignore
├── packages
├── .paket
│   ├── paket.exe.config
│   └── paket.targets
└── paket.dependencies

Remove PCL?

...since it's "deprecated" with netstandard coming, as it were?

`new` subcommand should not accept empty inputs

Expected Behavior

CLI should reject a null/empty/whitespace string as the project name and directory and prompt for the value again.

Current Behavior

Accepts an empty value which leads to .fs (which begins with module\n), .fsproj, etc being created which are invalid.

Possible Solution

See Expected Behavior.

Steps to Reproduce (for bugs)

$ forge new solution --name test
$ forge new project --template console

Enter project name:
>
Enter project directory (relative to working directory):
>

Your Environment

  • Version used: Forge 1.4.0
  • Environment name and version (F#, .Net): F# 4.1, Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/f5fbc32 Mon Nov 14 14:10:00 EST 2016)
  • Server type and version: Ionide 2.22.0 (what does "server type" mean?)
  • Operating System and version: macOS 10.12.3

`forge new project`

     Name cannot begin with the '%' character, hexadecimal value 0x25. Line 7, position 19.
Unable to parse /Users/h/dev/linux-intro/chapter-02/templates/windows/ApplicationName.fsproj:
      Name cannot begin with the '%' character, hexadecimal value 0x25. Line 7, position 19.
...

$ ./build.sh
Running build failed.
Error:
System.Xml.XmlException: Name cannot begin with the '%' character, hexadecimal value 0x25. Line 8, position 19.

when creating a new Suave project with forge.sh. (which also needs +x set)

Expected Behavior

No warnings on the console.

Current Behavior

Warnings seem to indicate faulty fsproj files.

Steps to Reproduce (for bugs)

curl -o Forge.zip -L https://github.com/fsharp-editing/Forge/releases/download/1.2.1/forge.zip
unzip Forge.zip
chmod +x forge.sh
./forge.sh new project
> MySrv

Your Environment

  • Version used: see above
  • Environment name and version (F#, .Net):
Mono JIT compiler version 4.6.2 (mono-4.6.0-branch/08fd525 Thu Nov 10 20:28:28 EST 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug
	LLVM:          yes(3.6.0svn-mono-master/8b1520c)
	GC:            sgen
  • Operating System and version: OS X

Wrong `TargetFramework` version in project file

When creating new F# FAKE console application with Forge, the TargetFramework of the generated project file is wrong.

Expected Behavior

According to the .NET Framework FAKE downloads, the value in project file should be:
<TargetFramework>netcoreapp2.0</TargetFramework>

Current Behavior

The project file tries to use older framework version:
<TargetFramework>net461</TargetFramework>

After changing the value, running ./build.sh succeeds.

Your Environment

  • Solus Linux with Mono 5.4.1.6
  • CentOS 7.4 with 5.10.1.20
  • Forge 2.2.0

Idea/Enhancement: Show a list of projects for commands where one is required but not supplied

I've (partly, no solution support) implemented the command to list projects, and I got to thinking that maybe Forge could show a list of available projects (like the template list when making a new project) for the commands where a project is required but the supplied in the arguments.

Example: forge.exe list files would then list the available projects and wait for a selection instead of doing nothing.

I haven't used Forge enough for "real world" work yet to know if it would bring enough value to make it worth having or if it is preferable in a general workflow to have Forge do nothing if the project argument is missing.

(Also after my brain woke up again I realized this was a better place to discuss it than on slack.)

Build fails on Fedora with `The required attribute "Project" in Import is empty`

Expected Behavior

./build.sh in the project root should build forge.

Current Behavior

Instead, the build fails entirely; it looks like there's a missing attribute in the Forge.fsproj.

Starting Target: Build (==> AssemblyInfo)
Building project: /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj
  /usr/bin/xbuild  /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj /t:Rebuild    /p:RestorePackages="False" /p:OutputPath="/home/rdonaldson/Code/open-source/Forge/temp" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/home/rdonaldson/Code/open-source/Forge/packages/FAKE/tools/FakeLib.dll"
XBuild Engine Version 14.0
Mono, Version 4.8.0.0
Copyright (C) 2005-2013 Various Mono authors

Build started 4/26/2018 8:52:01 AM.
__________________________________________________
/home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj: error : /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj: The required attribute "Project" in Import is empty
Build FAILED.
Errors:

/home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj: error : /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj: The required attribute "Project" in Import is empty

         0 Warning(s)
         1 Error(s)

Time Elapsed 00:00:00.0642260
Running build failed.
Error:
Building /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj failed with exitcode 1.

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target         Duration
------         --------
Clean          00:00:00.0010229
AssemblyInfo   00:00:00.0185917
Build          Failure
Total:         00:00:00.6301175
---------------------------------------------------------------------
Status:        Failure
---------------------------------------------------------------------
---------------------------------------------------------------------
  1) Building /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj failed with exitcode 1.
  2) : /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj(0,0): /home/rdonaldson/Code/open-source/Forge/src/Forge/Forge.fsproj: The required attribute "Project" in Import is empty

Steps to Reproduce (for bugs)

On Fedora 27, I:

  1. Installed mono-core and mono-devel using dnf.
  2. Ran cert-sync.
  3. Cloned Forge.
  4. Ran ./build.sh in the root of the Forge directory.

Context

Mostly this limits my ability to use Forge ;P I'm going to go investigate using a prebuilt release, which is likely to work fine for me.

Your Environment

  • Version used: master project branch at commit deb1adf855d5f59726dbd6ab1cc52e0e2336cfe1
  • Environment name and version (F#, .Net): Building with Mono 4.8
  • Operating System and version: Fedora 27

Wishlist: add Fake support to existing project

Many F# projects (created with VS new project wizard) could be supported by a pretty simple Fake build tasks.

Add a new command ("forge add fake" or whatever) that would create build.fsx, build.cmd and build.sh along with some basic tasks (run msbuild, deploy zip) after looking around for .sln file.

Program fails due to missing `Nett` dependency

Forge launches and then crashes when trying to evaluate aliases when I specify commands.

For example, using the environment config specified below, running forge --version results in the following stack trace:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <5839973d73406ffea74503833d973958>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'Nett, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'
  at Forge.Alias.load () [0x00010] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.applyAlias (System.String[] args) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.Commands.strikeForge (System.String[] args, Forge.Commands+Result cont) [0x00001] in <5839973d73406ffea74503833d973958>:0
  at Forge.App.main (System.String[] argv) [0x000b5] in <5839973d73406ffea74503833d973958>:0

Possible Solution

I think this is because the release folder doesn't contain the necessary dlls.
The recipe for homebrew just unzips the release to a directory like /usr/local/Cellar/forge/{VERSION}/libexec, and that folder doesn't contain Nett.dll per the build script.

As soon as that file is copied to the release zip, things work. I'm going to submit a PR to fix.

Context

Can't use forge to create new test workspaces/script projects easily

Your Environment

  • Version used: Forge 1.2.0 from Homebrew
  • Environment name and version (F#, .Net): Mono 4.6.2
  • Server type and version: N/A
  • Operating System and version: OSX El Capitan (10.11.6)

`forge rename file` deletes unrelated parts of the project file

Expected Behavior

forge rename file should rename the specified file on disk and in the fsproj file, but should not otherwise modify the fsproj in question.

Current Behavior

forge rename file renames the file on disk and in the fsproj file, but after, an ItemGroup has been removed and the project no longer compiles.

Vis:

rossdonaldson@becon λ ~/Code/personal/gearheart on master[!]
$ git status
On branch master
nothing to commit, working tree clean

rossdonaldson@becon λ ~/Code/personal/gearheart on master
$ forge rename file -p src/machinist/machinist.fsproj -n src/machinist/machinist.fs -r src/machinist/Machinist.fs
seq ["Samples.fs"; "Phabricator.fs"; "Database.fs"; "Args.fs"; ...]

rossdonaldson@becon λ ~/Code/personal/gearheart on master[!]
$ git diff src/machinist/machinist.fsproj
diff --git a/src/machinist/machinist.fsproj b/src/machinist/machinist.fsproj
index 1fdff15..383df1d 100644
--- a/src/machinist/machinist.fsproj
+++ b/src/machinist/machinist.fsproj
@@ -43,7 +43,7 @@
     <Compile Include="Phabricator.fs" />
     <Compile Include="Database.fs" />
     <Compile Include="Args.fs" />
-    <Compile Include="machinist.fs" />
+    <Compile Include="Machinist.fs" />
     <None Include="App.config" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
@@ -262,13 +262,6 @@
       </ItemGroup>
     </When>
   </Choose>
-  <ItemGroup>
-    <Reference Include="FSharp.Data.SqlProvider">
-      <HintPath>..\..\packages\SQLProvider\lib\FSharp.Data.SqlProvider.dll</HintPath>
-      <Private>True</Private>
-      <Paket>True</Paket>
-    </Reference>
-  </ItemGroup>
   <Choose>
     <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.3'">
       <ItemGroup>

Unfortunately I rather need that SqlProvider :P.

Possible Solution

Seems like a straight-up "it shouldn't do that", but I'm new to the language and tooling -- possibly I'm doing something wrong?

Steps to Reproduce (for bugs)

Pretty much as it says above -- have a project with a SqlProvider item group, change the name of a file in that project.

Your Environment

  • Version used: 1.3.3 (Note: there doesn't seem to be a way to get forge to admits its version. Am I wrong?)
  • Environment name and version (F#, .Net): mono 4.8.0, F# 4.1
  • Operating System and version: macOS Sierra

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.