Suave not working in heroku
ImaginaryDevelopment opened this issue · 3 comments
from my repository https://github.com/ImaginaryDevelopment/mono-suave (builds and deploys back to github releases from appveyor just fine)
-----> SuaveFramework app detected
-----> Downloading mono to /app/tmp/cache/heroku-18/vendor
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 1397k 0 0:00:05 --:--:-- 0:00:05 1397k
-----> Copying /app/tmp/cache/heroku-18/vendor/mono to /tmp/build_52d7eedd961e2d8c75c5bce0083d1fc2/vendor
-----> Linking /tmp/build_52d7eedd961e2d8c75c5bce0083d1fc2/vendor/mono --> /app
-----> Setting envvars
-----> Importing trusted root certificates
-----> paket.lock found, restoring packages with paket
Paket version 5.120.0
Downloading FSharp.Core 4.6.2
Downloading Suave 2.5.3
Performance:
- Disk IO: 1 second
- Average Download Time: 1 second
- Number of downloads: 2
- Average Request Time: 1 second
- Number of Requests: 2
- Runtime: 5 seconds
-----> packages.config found, installing dependencies with nuget
Unhandled Exception:
System.MissingMethodException: Method 'AppContext.SetSwitch' not found.
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method 'AppContext.SetSwitch' not found.
! Push rejected, failed to compile SuaveFramework app.
! Push failed
From the button on suave.io
-----> SuaveFramework app detected
-----> Downloading mono to /app/tmp/cache/heroku-18/vendor
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 --:--:-- --:--:-- --:--:-- 0
-----> Copying /app/tmp/cache/heroku-18/vendor/mono to /tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor
-----> Linking /tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor/mono --> /app
-----> Setting envvars
-----> Importing trusted root certificates
-----> paket.dependencies found, installing packages with paket
Paket version 5.120.0
Resolving packages for group Main:
- Suave 2.5.3
- FSharp.Core 4.6.2
Locked version resolution written to /tmp/build_c7901ccdfba52edb511cc04513bcb0de/paket.lock
Installing into projects:- Creating model and downloading packages.
Downloading FSharp.Core 4.6.2
Downloading Suave 2.5.3
Performance:- Resolver: 5 seconds (1 runs)
- Runtime: 209 milliseconds
- Blocked (retrieving package details): 3 seconds (2 times)
- Blocked (retrieving package versions): 1 second (2 times)
- Disk IO: 1 second
- Average Download Time: 505 milliseconds
- Number of downloads: 2
- Average Request Time: 1 second
- Number of Requests: 17
- Runtime: 8 seconds
-----> Compiling app.fsx
F# Compiler for F# 4.1
Freely distributed under the Apache 2.0 Open Source License
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/app.fsx(10,1): warning FS0211: The search directory '/tmp/build_c7901ccdfba52edb511cc04513bcb0de/packages/Suave/lib/net40' could not be found
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/app.fsx(11,1): error FS0078: Unable to find the file 'packages/Suave/lib/net40/Suave.dll' in any of
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor/mono/lib/mono/4.5-api
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor/mono/lib/mono/4.5-api/Facades
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor/mono/lib/mono/4.5
/tmp/build_c7901ccdfba52edb511cc04513bcb0de/vendor/mono/lib/mono/4.5/Facades
/tmp/build_c7901ccdfba52edb511cc04513bcb0de
/app/mono/lib/mono/4.5
! Push rejected, failed to compile SuaveFramework app.
! Push failed
my app's code
let routing =
choose[
path "/" >=> OK "hello"
]
[<EntryPoint>]
let main argv =
printfn "%A" argv
0 // return an integer exit code
At first glance I think we need to upgrade the mono version in the buildpack.
https://github.com/SuaveIO/mono-script-buildpack/blob/master/bin/compile#L12
On a second though I think is time to upgrade the Heroku script to use dotnet core instead of mono.
I have the same problem.