Git Product home page Git Product logo

safe-bookstore's Introduction

Introducing SAFE Bookstore

Deployed Demo

Demo

You'll need to install the following pre-requisites in order to build SAFE applications

Install pre-requisites

You'll need to install the following pre-requisites in order to build SAFE applications

Getting started

Before you run the project for the first time only you must install dotnet "local tools" with this command:

dotnet tool restore

To concurrently run the server and the client components in watch mode use the following command:

dotnet run

This will also spin up a local docker container with Azurite storage emulator which is used to save the wishlist data.

The build project in root directory contains a couple of different build targets. You can specify them after -- (target name is case-insensitive).

Finally, there are Bundle and Azure targets that you can use to package your app and deploy to Azure, respectively:

dotnet run -- Bundle
dotnet run -- Azure

SAFE Stack Documentation

If you want to know more about the full Azure Stack and all of it's components (including Azure) visit the official SAFE documentation.

You will find more documentation about the used F# components at the following places:

safe-bookstore's People

Contributors

0x53a avatar akoslukacs avatar alfonsogarciacaro avatar aprooks avatar baronfel avatar bentayloruk avatar bohdanszymanik avatar cgravill avatar davidpodhola avatar dependabot[bot] avatar dsyme avatar dustinmoris avatar enricosada avatar forki avatar isaacabraham avatar jeremyabbott avatar jwthomson avatar kerams avatar krzysztof-cieslak avatar larocceau avatar martinbryant avatar mastoj avatar matthid avatar mexx avatar monkieboy avatar rfrerebe avatar rmunn avatar tforkmann avatar vbfox avatar zaaack 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safe-bookstore's Issues

Build twice in a row -> "Could not rename chromedriver"

Description

If you build the scaffold twice in a row, the second build errors out with a message about being unable to rename chromedriver. Reproduced on Linux Mint, won't be able to try Windows for several days, don't have a Mac to test on.

Repro steps

  1. git clone https://github.com/fable-compiler/fable-suave-scaffold
  2. cd fable-suave-scaffold
  3. ./build.sh - succeeds
  4. ./build.sh - fails

Expected behavior

The second build should succeed as well.

Actual behavior

Second build fails during the RenameDrivers target with the exception:

Running build failed.
Error:
System.Exception: Could not rename chromedriver at test/UITests/bin/Debug/net461/chromedriver. Message: Error 183
  at [email protected] (System.String message) [0x00001] in <fd501e0bd6184492a524270ebab8b6fc>: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 [email protected] (Microsoft.FSharp.Core.Unit _arg11) [0x000d4] in <fd501e0bd6184492a524270ebab8b6fc>:0 
  at Fake.TargetHelper+targetFromTemplate@209-1[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <597b0a4fccf1c534a74503834f0a7b59>:0 
  at Fake.TargetHelper.runSingleTarget (Fake.TargetHelper+TargetTemplate`1[a] target) [0x0004b] in <597b0a4fccf1c534a74503834f0a7b59>:0 

Error 183 is "Cannot create file when that file already exists."

Known workarounds

To fix this, change this line in build.fsx:

        elif isLinux then

to:

        elif isLinux && not <| File.Exists "test/UITests/bin/Debug/net461/chromedriver" then

I'll submit a PR for this.

Related information

  • Operating system: Linux
  • Branch: master
  • .NET Runtime, CoreCLR or Mono Version: .NET Core 1.0.4

add vscode files to exclude build artifacts from vscode

There are current build artifacts such as bin and obj folders are still included in vscode.

We should include a workspace config files to exclude these folders. Most of the exclusions can just be copied from .gitignore file.

Thoughts?

Cursor jumps to end when editing

Go to login page and type "12345" now position the cursor after "2" and type "7", the cursor jumps after "5".

Related information

  • Windows 10
  • Master
  • .CoreCLR

Please remove msu

Solution and projects seems still to be named msu.SmartMeterHome. Urgs

Catalog of reasons Mono/.NET Framework is needed

I took a look over the repo. It's looking great. Moving to the 1.0 SDK of .NET Core really helped

Could we track the reasons why Mono or .NET Framework are needed and link to any WIP issues in the relevant repos?

  • FAKE needs Mono or .NET Framework
  • Paket needs Mono or .NET Framework
  • Canopy needs Mono or .NET Framework

I'm just wondering what's remaining to lift that dependency.

thanks
don

Node and Yarn automatic install, and Mono for nix machines?

In the manual validation that our vendors are doing, I had bad repro steps and didn't explicitly call out that Node and Yarn are requirements. This resulted in a manual test failure (couldn't find node.exe) after running build.cmd on a fresh Windows machine with no other dependencies.

I've since updated those steps to include downloading them as dependencies, but I wonder if it's possible to automatically install Node, Yarn, and Mono (if on a non-Windows machine) if they're not present. Windows already comes with an installation of .NET Framework, so this should work there too. That way the story would be the same for any machine: download/clone and build.cmd/build.sh.

Deploy to Azure

More of question than issue. Any ideas how to deploy to Azure? I assume content of Server\bin\Debug\netcoreapp1.1 together with the Client needs to be deployed, but I will ask first before I will dig deeper into this :-)

Unit tests missing

Since it's scaffold I'd expect it to have unit tests projects separate from UITests.

I could add backend test example via expecto but no idea how to deal with it on Fable side.

What do you think?

Error on login

Hey together,

when I checkout the repo and run build.cmd run everything builds fine but when I then try to login into the sample application I get the following error on the console:

[HPM] Error occurred while trying to proxy request /api/users/login from localhost:8080 to http://localhost:8085 (ECONNREFUSED) (https://node
js.org/api/errors.html#errors_common_system_errors)

The build output states the the server was started on port 61225 (not 8085 as specified in Server/Server.fs).

...
Finished Target: InstallClient                                           
Starting Target: Run (==> InstallClient)                                 
C:\Users\X\AppData\Local\dotnetcore\dotnet.exe fable npm-run start 
C:\Users\X\AppData\Local\dotnetcore\dotnet.exe watch run           
Fable server started on port 61225                                      
CWD: C:\Users\sschmid\Desktop\fable-suave-scaffold\src\Client            
cmd /C npm run start                                                     
watch : Started
...                                                          

The client also outputs the error:
POST http://localhost:8080/api/users/login 504 (Gateway Timeout)

I've already tried to rewire the ports of the webpack devserver proxy and the suave server but that didn't help.

Did anyone else encounter this problem? Or Do you have an idea on how to fix it?

Thanks!

Can't get hot reloading to work

Description

Editing and saving either one of the client-side .fs files or the Client.fsproj files does not trigger a recompile / refresh.

The default fable template for the dotnet CLI, meanwhile, hot-recompiles correctly.

Repro steps

This works (change a line in App.fs and it recompiles instantly):

  1. dotnet new -i Fable.Template::*
  2. dotnet new fable -n basicTemplate
  3. yarn install
  4. dotnet restore
  5. dotnet fable webpack-dev-server

This one does not:

  1. git clone https://github.com/fable-compiler/fable-suave-scaffold
  2. sh ./build.sh run

Known workarounds

None so far, I've fiddled with webpack.config.js, trying to make it as similar to the one from the basic template as possible, without success. I tried adding a plain Javascript file to the project (with a corresponding separate entry value in webpack.config.js) and that file does not hot-recompile either.

Meanwhile I updated the basic template to Fable 1.0.14 and it still hot-recompiled correctly, so at least it shouldn't be a Fable problem.

Related information

The environment is a minimal VM I'm setting up for web and cloud development, to avoid all the annoyances with Windows. These are the globally installed tools:

  • Debian 8
  • VS Code + Ionide
  • mono 5.0.1
  • .NET Core 1.0.4
  • yarn 0.24.6
  • node 8.1.1
  • npm 5.0.3

React as default dependency

Description

The Apache Project explicitly disallowed the React usage in Apache Projects due licensing problems. What is the project owners and private / corporate contributors opinion about this? As far as I know most of the F# open source project prefer Apache Licence 2.0, even if this project use a different license called unlicense.

https://issues.apache.org/jira/browse/LEGAL-303?focusedCommentId=16088663&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16088663

build.cmd fails behind proxy

Running build failed.
Error:
System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
   at System.Net.WebClient.DownloadFile(Uri address, String fileName)
   at System.Net.WebClient.DownloadFile(String address, String fileName)
   at [email protected](Unit unitVar)
   at [email protected](Unit _arg3)
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 492

Restore failed on Ubuntu 16.04

Description

Restore failed on Ubuntu 16.04 with Error :

Starting Target: Build (==> BuildClient)
/home/thomas/.local/share/dotnetcore/dotnet restore
Failed to initialize CoreCLR, HRESULT: 0x80131500
Running build failed.
Error:
System.Exception: Restore failed
at [email protected] (Microsoft.FSharp.Core.Unit _arg4) <0x41a5b050 + 0x0017b> in :0
at Fake.TargetHelper+targetFromTemplate@195[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) <0x419de900 + 0x00023> in :0
at Fake.TargetHelper.runSingleTarget (Fake.TargetTemplate`1 target) <0x419d3a00 + 0x000ca> in :0

Repro steps

Please provide the steps required to reproduce the problem

  1. Clone Repository

  2. run build.sh

Expected behavior

Build without errors :-)

Known workarounds

Install http://packages.ubuntu.com/de/trusty/amd64/libicu52/download

Related information

Login is not shown

I have a rather small problem, after logging out the second time, I need to click on home before the login screen is shown.

So the steps to reproduce:
click โ€œLogoutโ€, -> Welcome page is shown
click โ€œLoginโ€ -> Login page shown, logging in
click โ€œLogoutโ€ -> click Login welcome page is still shown
I have to click โ€œHomeโ€ and then โ€œLoginโ€ again to display the Login page.

If I open a new page and open localhost:8080, it is also after the second โ€œLogoutโ€, that I have to press โ€œhomeโ€ before the login is displayed.

I can reproduce it with Chrome Version 59.0.3071.115 (64-Bit)
and IE Version 11.0.9600.18665.

It is not big issue for me, but I know some people who think, if that does not work what is with the rest.

Docker image doesn't work

We have a very simple Dockerfile that just tries to dockerize an already "published" .NETCore app:

FROM microsoft/dotnet:1.1.0-sdk-msbuild-rc4
COPY . .
ENTRYPOINT ["dotnet", "Server.dll"]

you can create the image with:

build.cmd publish

If you then run the container with:

docker run -it --rm forki/fable-suave

It fails with the error:

Error: assembly specified in the dependencies manifest was not found -- package: 'fsharp.core', version: '4.1.0', path: 'lib/netstandard1.6/FSharp.Core.dll'

This is technically correct, but I you do the following it works:

cd deploy
dotnet Server.dll

So something inside the Dockerfile is causing the runtime to look at different place.

The library 'hostpolicy.dll' required to execute the application was not found

Description

After I pull and build.cmd, I get this error

The library 'hostpolicy.dll' required to execute the application was not found

Repro steps

Please provide the steps required to reproduce the problem

  1. Have correct prerequisities (.NET Core Preview4)

  2. Clone the repository

  3. Run build.cmd,

Expected behavior

To start the server and browser

Actual behavior

Server is not started.

Known workarounds

Sorry, not found.

Related information

  • Operating system: Windows 10 Enterprise Version 10.0.14393
  • Branch: master
  • .NET Runtime, CoreCLR or Mono Version: dotnet --version is 1.0.0-preview4-004233
  • Performance information, links to performance testing scripts: none

capture

[Question] Do we want to promote the usage of Suave.AspNetCore as a best practice?

Right now, the scaffold uses Suave.AspNetCore as a dependency to run the suave application with kestrel as the webserver.

Kestrel has a lot of support and is very quick, which is a good thing.

But I'm not sure about the implications that this has on a larger application.

My only concern stems from https://github.com/dustinmoris/Suave.AspNetCore#error-handling-and-other-suave-config-settings

Suave.AspNetCore allows you to hook a Suave web application (WebPart) into the ASP.NET Core pipeline. Anything that was configured in the SuaveConfig was web server specific and required to run Suave's own web server via startWebServer. In ASP.NET Core there are other means to configure the same settings. For more information please check out the ASP.NET Core Fundamentals.

So we possible lose some suave config, but gain some aspnet kestrel config? Has anyone tried hooking up logary, or other working suave config settings to make sure that the api surface is similar/compatible.

While I don't doubt that Kestrel is a really good web server, I just want to make sure it is the right precedent to be setting, since it's possible to run suave on aspnet core without kestrel, and keep all of the configuration in the suave webserver.

After adding a book, DOM <> Model is inconsistent

I have filled the three fields, then pressed add twice.

The first click correctly added the new book, the second click failed as seen in the screenshot:

image

This is the last message from the console:
image

There seems to be an inconsistency between the actual DOM and the model, in the model, the three textboxes are empty, but in the dom, they contain the previous values.

This occurs in both Chrome and Edge.

Build breaks after there recent Fable migration to paket/yarn from npm on Mac

Description

Build breaks after there recent Fable migration to paket/yarn from npm on Mac

Repro steps

./build.sh run
fails with:

dotnet fable npm-run start
๏ปฟdotnet watch run
๏ปฟNo executable found matching command "dotnet-watch"
ERROR: Cannot find Fable.Compiler package. Please make sure it's been added to paket.dependencies.

I've updated my Client.proj and Server.proj according to the latest examples but it didn't help very much.
Looks like something is wrong with the build command

Default build script fails

Build script fails when running sh ./build.sh

Of course i didn't read the documentation when running the build for the first time and received the following error when the build got to the Tests.sln file.

  1. Building /Users/databox/Github/fable-suave-scaffold/Tests.sln failed with exitcode 1.
  2. : /Users/databox/Github/fable-suave-scaffold/test/UITests/UITests.fsproj(0,0): /Users/databox/Github/fable-suave-scaffold
    /test/UITests/UITests.fsproj: Field 'System.Text.RegularExpressions.Regex.IsMatch' not found.

Upon rereading the instructions, I see that I was supposed to run the build with the "run" target for "development mode" and that the default build is for full Visual Studio on Windows users.

I would suggest rethinking this strategy, as users don't expect the default build script to fail. Maybe a simple app for VS Code users without sln files and simple core only fsproj files? And an advanced app for Visual Studio on Windows users where there is built in tooling for sln and fsproj files?

Unit tests fail with error and exit code -2146232576 when net462 is not installed

Machine info:

  • Windows 10 x86 ENU
  • VS Enterprise 2017 d15rel version: 15.4.0 Preview 2.0 [26829.00.d15rel]
  • dotnet --version: 2.0.0
  • Node.js LTS
  • Yarn --version: 0.27.5

Vendors reported build.cmd failing with this:

1) Fake.UnitTestCommon+FailedTestsException: Expecto test of assembly 'C:\Users\ddltd1\source\repos\fable-suave-scaffold\test\UITests\bin\Debug\net461\UITests.exe' failed. Process finished with exit code -2146232576.
   at Fake.Testing.Expecto.Expecto(FSharpFunc`2 setParams, IEnumerable`1 assemblies) in D:\code\fake\src\app\FakeLib\UnitTest\Expecto\Expecto.fs:line 126
   at [email protected](Unit _arg13) in C:\Users\ddltd1\source\repos\fable-suave-scaffold\build.fsx:line 182
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

image001

build.cmd : Login with test user failing

Description

Login with test user failing

Repro steps

  1. run build.cmd

Expected behavior

test should not fail

Actual behavior

[10:31:56 INF] EXPECTO? Running tests...
[10:31:57 DBG] 127.0.0.1 connected. Now has 1 connected
[10:31:57 INF] 127.0.0.1 11504 - [19/juin/2017:08:31:57 Z] "GET / HTTP/1.1" 200 0
[10:31:57 DBG] 127.0.0.1 connected. Now has 2 connected
[10:31:57 INF] 127.0.0.1 11504 - [19/juin/2017:08:31:57 Z] "GET /css/site.css HTTP/1.1" 200 0
[10:31:57 DBG] 127.0.0.1 connected. Now has 3 connected
[10:31:57 INF] 127.0.0.1 11504 - [19/juin/2017:08:31:57 Z] "GET /js/shim.min.js HTTP/1.1" 200 0
[10:31:57 INF] 127.0.0.1 11504 - [19/juin/2017:08:31:57 Z] "GET /js/fetch.js HTTP/1.1" 200 0
[10:31:57 INF] 127.0.0.1 11504 - [19/juin/2017:08:31:57 Z] "GET /public/bundle.js HTTP/1.1" 200 0
[ERROR - 2017-06-19T08:31:57.992Z] Session [c1074bd0-54c9-11e7-880b-536a8a63c7e4] - page.onError - msg: Error parsing url

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:31:57.997Z] Session [c1074bd0-54c9-11e7-880b-536a8a63c7e4] - page.onError - stack:
r (http://localhost:8085/public/bundle.js:20)

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:31:58.194Z] Session [c1074bd0-54c9-11e7-880b-536a8a63c7e4] - page.onError - msg: Error parsing url

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:31:58.202Z] Session [c1074bd0-54c9-11e7-880b-536a8a63c7e4] - page.onError - stack:
r (http://localhost:8085/public/bundle.js:20)

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:32:03.920Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861123866

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:32:05.123Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861125067

phantomjs://platform/console++.js:263 in error
[10:32:05 INF] 127.0.0.1 11504 - [19/juin/2017:08:32:05 Z] "POST /api/users/login HTTP/1.1" 200 259
[10:32:05 INF] 127.0.0.1 11504 - [19/juin/2017:08:32:05 Z] "GET /api/wishlist/ HTTP/1.1" 200 182
[ERROR - 2017-06-19T08:32:06.374Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861126320

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:32:09.468Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861129412

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:32:11.968Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861131912

phantomjs://platform/console++.js:263 in error
[ERROR - 2017-06-19T08:32:14.469Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1497861134413

phantomjs://platform/console++.js:263 in error
[10:32:16 ERR] client tests/login with test user errored in 00:00:18.1160000
canopy.types+CanopyWaitForException: Condition not met in given amount of time. If you want to increase the time, put compareTimeout <- 10.0 anywhere before a test to increase the timeout
waitFor condition failed to become true in 10.0 seconds
ร  canopy.core.waitFor2(String message, FSharpFunc2 f) dans C:\projects\canopy\src\canopy\canopy.fs:ligne 221 ร  [email protected](FSharpFunc2 f) dans C:\projects\canopy\src\canopy\canopy.fs:ligne 224
ร  [email protected](Unit unitVar0) dans C:\yoann\Forks\fable-suave-scaffold\test\UITests\Tests.fs:ligne 34
ร  [email protected](Unit unitVar)
ร  [email protected](AsyncParams`1 args)
[10:32:16 INF] EXPECTO! 2 tests run in 00:00:19.5365623 โ€“ 1 passed, 0 ignored, 0 failed, 1 errored. ( เฒฐ ฤนฬฏ เฒฐเณƒ )
[INFO [ 10:32:16 DBG-] Shutting down transport
20[110:32:16 7DBG-] 0Shutting down transport
6-[10:32:161 DBG9] TShutting down transport
08:32:16.452Z] ShutdownReqHand - _handle - About to shutdown
[10:32:16 DBG] Disconnected 127.0.0.1. 1 connected.
[10:32:16 DBG] Disconnected 127.0.0.1. 2 connected.
[10:32:16 DBG] Disconnected 127.0.0.1. 0 connected.
Running build failed.

Known workarounds

Please provide a description of any known workarounds.

Related information

  • Windows 10
  • Master
  • CoreCLR

Missing .paket\paket.exe

When running build.cmd I got this error '.paket\paket.exe' is not recognized as an internal or external command.

Getting `error MSB4057: The target "Restore" does not exist in the project.`

Description

Getting error MSB4057: The target "Restore" does not exist in the project. while dotnet restore run for projects. Same is true for server and client project.

Repro steps

Please provide the steps required to reproduce the problem

  1. Clone project.
  2. Run build.cmd and it will work until it reaches InstallServer and fail with above error while trying dotnet restore.
  3. I tried to go to the folder and run dotnet restore. Same result.

Expected behavior

It should build and test should run.
Please provide a description of the behavior you expect.

Actual behavior

Failing at dotnet restore

Known workarounds

Nothing yet.

Related information

OS : Win10
VS : 2017 installed with latest update
dot net core : sdk installed 2.0.0 latest one

Note : If I try creating separate F# project using dotnet new then dotnet restore & dotnet build both works. In above case even build is failing. While googling I found out that in some cases build is working just restore is failing.

Let me know if any further info is require or if there is any steps I can try to narrow down issue.

Build fails when running unit tests

Description

When running build.cmd I get an error stating:
"d:\repos2\fable-suave-scaffold\test\ServerTests\Tests.fs(3,6): error FS0039: The namespace or module 'Expecto' is not defined."

From looking at the fsproj file, I cannot see where it is referenced.

Repro steps

  1. Step A
    git clone

  2. Step B
    run build.cmd from Command window.

Expected behavior

I expected the build to pass without errors

Actual behavior

There are test errors. Packages seems to be missing, although they are downloaded to packages\test\Expecto

Known workarounds

None that I know of. I'm new to .Net core so I have no idea how to fix this.

Related information

  • Operating system - Windows 10
  • Branch - master
  • .NET Runtime, CoreCLR or Mono Version
    .NET Core 2.0
  • Performance information, links to performance testing scripts

Here is a more detailed screen dump:
//================================================================
Starting Target: BuildServerTests (==> BuildClient)
dotnet build
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Server -> d:\repos2\fable-suave-scaffold\src\Server\bin\Debug\netcoreapp2.0\Server.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.10
Finished Target: BuildServerTests
Starting Target: RunServerTests (==> BuildServerTests)
dotnet run
d:\repos2\fable-suave-scaffold\test\ServerTests\Tests.fs(3,6): error FS0039: The namespace or module 'Expecto' is not defined. [d:\repos2\fable-suave-scaffold\test\ServerTests\ServerTests.fsproj]
d:\repos2\fable-suave-scaffold\test\ServerTests\Tests.fs(7,3): error FS0039: The value or constructor 'testList' is not defined. Maybe you want one of the following:๏ฟฝ WishList [d:\repos2\fable-suave-scaffold\test\ServerTests\ServerTests.fsproj]
d:\repos2\fable-suave-scaffold\test\ServerTests\Program.fs(3,6): error FS0039: The namespace or module 'Expecto' is not defined. [d:\repos2\fable-suave-scaffold\test\ServerTests\ServerTests.fsproj]
d:\repos2\fable-suave-scaffold\test\ServerTests\Program.fs(7,9): error FS0039: The value or constructor 'runTestsWithArgs' is not defined. [d:\repos2\fable-suave-scaffold\test\ServerTests\ServerTests.fsproj]

The build failed. Please fix the build errors and run again.
Running build failed.
Error:
System.Exception: dotnet run failed
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
at FSI_0005.Build.runDotnet(String workingDir, String args)
at [email protected](Unit _arg12)
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626


Build Time Report

Target Duration


Clean 00:00:00.0252372
InstallDotNetCore 00:00:00.0710740
InstallServer 00:00:07.0040820
InstallServerTests 00:00:11.5556242
InstallClientTests 00:00:05.2271147
InstallClient 00:00:07.6406079
BuildServer 00:00:11.6913353
BuildClient 00:00:21.4524359
BuildServerTests 00:00:07.5373696
RunServerTests Failure
Total: 00:01:27.5267116

Status: Failure


  1. System.Exception: dotnet run failed
    at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1379.Invoke(String message)
    at FSI_0005.Build.runDotnet(String workingDir, String args)
    at [email protected](Unit _arg12)
    at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

build.cmd fails

Paket version 3.36.0
0 seconds - ready.
Building project with version: LocalBuild
Shortened DependencyGraph for Target All:
<== All
   <== RunTests
      <== RenameDrivers
         <== BuildTests
            <== Build
               <== BuildClient
                  <== AssemblyInfo
                     <== InstallClient
                        <== InstallDotNetCore
                           <== Clean

The resulting target order is:
 - Clean
 - InstallDotNetCore
 - InstallClient
 - AssemblyInfo
 - BuildClient
 - Build
 - BuildTests
 - RenameDrivers
 - RunTests
 - All
Starting Target: Clean
Deleting contents of bin
Deleting contents of temp
Deleting contents of docs/output
Deleting contents of ./deploy
Deleting contents of E:\github\fable-suave-1\src\Client\public/bundle
Finished Target: Clean
Starting Target: InstallDotNetCore (==> Clean)
C:\Users\kirichenko.KL\AppData\Local\dotnetcore\dotnet.exe --version
dotnetcli 1.0.0-rc4-004771 already installed
Finished Target: InstallDotNetCore
Starting Target: InstallClient (==> InstallDotNetCore)
C:\Program Files\nodejs\npm.cmd install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Finished Target: InstallClient
Starting Target: AssemblyInfo (==> InstallClient)
Created AssemblyInfo file "E:\github\fable-suave-1\src\Client\AssemblyInfo.fs".
Created AssemblyInfo file "E:\github\fable-suave-1\src\Server\AssemblyInfo.fs".
Finished Target: AssemblyInfo
Starting Target: BuildClient (==> AssemblyInfo)
C:\Program Files\nodejs\npm.cmd run build

> [email protected] build E:\github\fable-suave-1\src\Client
> node ../../node_modules/fable-compiler --target production

fable-compiler 0.7.46: Start compilation...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `node ../../node_modules/fable-compiler --target production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'node ../../node_modules/fable-compiler --target production'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the navigation package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ../../node_modules/fable-compiler --target production
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs navigation
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls navigation
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     E:\github\fable-suave-1\src\Client\npm-debug.log
Running build failed.
Error:
System.Exception: Error while running 'C:\Program Files\nodejs\npm.cmd' with args: run build
   at FSI_0005.Build.run'@57-3.Invoke(String message) in E:\github\fable-suave-1\build.fsx:line 57
   at FSI_0005.Build.run'(TimeSpan timeout, String cmd, String args, String dir) in E:\github\fable-suave-1\build.fsx:line 57
   at [email protected](String cmd, String args, String dir) in E:\github\fable-suave-1\build.fsx:line 59
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 492

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target              Duration
------              --------
Clean               00:00:00.0052332
InstallDotNetCore   00:00:00.5821592
InstallClient       00:00:03.5400649
AssemblyInfo        00:00:00.0219934
Total:              00:00:06.2803863
Status:             Failure
---------------------------------------------------------------------
  1) System.Exception: Error while running 'C:\Program Files\nodejs\npm.cmd' with args: run build
   at FSI_0005.Build.run'@57-3.Invoke(String message) in E:\github\fable-suave-1\build.fsx:line 57
   at FSI_0005.Build.run'(TimeSpan timeout, String cmd, String args, String dir) in E:\github\fable-suave-1\build.fsx:line 57
   at [email protected](String cmd, String args, String dir) in E:\github\fable-suave-1\build.fsx:line 59
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 492
---------------------------------------------------------------------

Code highlight issue in Server project

Hi guys! And thanks for an absolutely fantastic project!

Having an annoying issue when running it in Visual Studio Code.
Only applies to the Server project.
It all builds and runs fine but the editor itself doesn't recognise (highlights opens with red) namespaces imported with paket in Server.fs and Program.fs but doesn't complain and works well in Shared/Domain.fs.
No issues with Client project either.

Is it something wrong with my setup or a common issue?

Tried on both Mac and Win.

Many thanks
Yuriy
image

Add expecto / canopy test

Since this has a great chance to become the "this is the way to do it" project, we should add expecto tests and canopy as a sample.

Remote access error on running build.cmd

Hi together,

I get the following error when running the build.cmd script:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 93.184.221.200:443
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.WebClient.DownloadFile(Uri address, String fileName)
   at System.Net.WebClient.DownloadFile(String address, String fileName)
   at [email protected](Unit unitVar)
   at [email protected](Unit _arg3)
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 492

@vasily-kirichenko opened a similar issue at #64 however in my case I'm not behind a proxy and the error seams to be about some incorrect permissions.

Did you face that problem before or do you know about it? Do you have some hint about how to resolve it?
If you need further information pls let me know.

Thanks in advance.

"Address already in use" when doing a change in server code

I wanted to try out how the reload of both client and server worked and it failed when changing server code. I did a minor change to defaultWishList to get something visual out, but when it tried to reload the server it seemed like the old process were still alive since it got a conflict on the address.

Repro steps:

  • ./build.sh run
  • login
  • Do a minor change to defaultWishList
  • Failed

Info

  • Operating system : OSX
  • Branch : master
  • Dotnet info:
.NET Command Line Tools (1.0.1)

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

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/1.0.1

Let me know if anything more is needed.

How to run as .NET 4.6.1 application?

Description

I would like to run the app as a standard .NET app. What changes are necessary to make that work. Just changing the netcoreapp1.1 in Server.fsproj to netstandard1.6 or NET does not seem to work. I'm trying to use Suave.OAuth, which appears to only work with full .NET.

Repro steps

  1. Replace netcoreapp1.1 in Server.fsproj to net461

Expected behavior

I would expect this to allow me to build and run the Server project as a standard .NET app.

Actual behavior

The build fails with the following output:

C:\Users\Paul\AppData\Local\dotnetcore\sdk\1.0.0-rc3-004530\NuGet.targets(97,5): error : Package System.Security.Cryptography.OpenSsl 4.3.0 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package System.Security.Cryptography.OpenSsl 4.3.0 supports: netstandard1.6 (.NETStandard,Version=v1.6) [C:\Tachyus\fable-suave-scaffold\src\Server\Server.fsproj]
C:\Users\Paul\AppData\Local\dotnetcore\sdk\1.0.0-rc3-004530\NuGet.targets(97,5): error : Package Microsoft.FSharp.Core.netcore 1.0.0-rc-170122 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.FSharp.Core.netcore 1.0.0-rc-170122 supports: netstandard1.6 (.NETStandard,Version=v1.6) [C:\Tachyus\fable-suave-scaffold\src\Server\Server.fsproj]
C:\Users\Paul\AppData\Local\dotnetcore\sdk\1.0.0-rc3-004530\NuGet.targets(97,5): error : One or more packages are incompatible with .NETFramework,Version=v4.6.1. [C:\Tachyus\fable-suave-scaffold\src\Server\Server.fsproj]

Update I found that using a real TargetVersion helps and am now using net461. Now I see the above issue with System.Security.Cryptography.OpenSsl. Is there a good way to replace this?

Known workarounds

I don't know of any workarounds.

Related information

  • Windows 10
  • master
  • .NET 4.6.1, .NET Core installed by build.cmd

Big total package size

The total package size download is big - ~600MB under packages

Repro steps

Build and measure size of "packages" directory

Expected behavior

Less package

Actual behavior

Lotsa package

RenameDrivers fails on second run on macOS

Description

On the second run of ./build.sh on macOS Sierra, the RenameDrivers task fails.

Repro steps

Run ./build.sh twice.

Expected behavior

Successful build.

Actual behavior

Running build failed.
Error:
System.IO.IOException: Error 183
  at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00214] in <12e050e5b3d34326a1b4e2e7624e75da>:0
  at System.IO.FileInfo.MoveTo (System.String destFileName) [0x0004b] in <12e050e5b3d34326a1b4e2e7624e75da>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileInfo:MoveTo (string)
  at [email protected] (Microsoft.FSharp.Core.Unit _arg2) [0x00040] in <5d0fb7ddd1cb4823878a191f972c171f>:0
  at Fake.TargetHelper+targetFromTemplate@195[a].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <58aaff2accf1c534a74503832affaa58>:0
  at Fake.TargetHelper.runSingleTarget (Fake.TargetHelper+TargetTemplate`1[a] target) [0x00040] in <58aaff2accf1c534a74503832affaa58>:0

Known workarounds

Manually removing test/UITests/bin/Release/chromedriver before the second run fixes the problem.

Related information

  • Operating system
    macOS Sierra

  • Branch
    master

  • .NET Runtime, CoreCLR or Mono Version
    mono 4.8.0

Minor change needed for scaffold to build against Suave 2.2.x

Description

The recent release of Suave 2.2.x includes a breaking change that, among other things, hides the YoLo.fs file from user code (so its functions are only exposed internally to Suave, and not to end-user code that consumes the Suave library).

This causes one line of the scaffold to break: in Auth.fs, there's a function that uses UTF8.bytes:

let UNAUTHORIZED s = unauthorized (UTF8.bytes s)

UTF8.bytes comes from YoLo.fs, so it's not accessible once you move to Suave 2.2.0 or later. The fix is to replace that line with:

let UNAUTHORIZED (s : string) = unauthorized (System.Text.Encoding.UTF8.GetBytes s)

Alternately, since the unauthorized and UNAUTHORIZED functions are already defined in Suave.RequestErrors, they could simply be deleted from Auth.fs, making the solution even simpler.

Race condition between server watch processes

Description

I've been encountering IOExceptions pretty often while trying out the scaffold, and I think I've narrowed it down to the changes introduced in #129: there are two dotnet watch processes running, and when I change a file in the server code, they both try to generate the src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json file at the same time, resulting in one of them throwing an IOException and shutting down.

Repro steps

  1. Clone the https://github.com/fable-compiler/fable-suave-scaffold repo.
  2. Run ./build.sh run in the freshly-cloned repo.
  3. Wait for it to build and start the two dotnet watch processes.
  4. Edit the src/Server/WebServer.fs file and save it.
  5. One of the two dotnet watch processes is very likely to throw an IOException.

Expected behavior

The watch processes should not interfere with each other, or there should be just a single watch process.

Actual behavior

One of the two watch processes throws an IOException with the error message:

System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

Full exception stack trace:

/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

That same stack trace, with the Microsoft.NET.Sdk.targets path trimmed so it's easier to read:

error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

Known workarounds

If I remove unitTestsWatch from the Run target in build.fsx so that there's only a single dotnet watch process running, everything goes smoothly.

Related information

  • Operating system: Linux Mint 18.1 (based on Ubuntu Xenial 16.04)
  • Branch: master
  • .NET Runtime, CoreCLR or Mono Version: 1.0.4

if you hit enter on "webpack: Compiled successfully." it ends the process

Description

./build.sh run

if you hit enter on "webpack: Compiled successfully." it says Process terminated, it really ends the app serving on localhost:8080 but it does not end the process. It keeps working until you Control-C which causes an exception to be shown.

  1. The enter key is a usability problem imho, because you want the window open because you want to see the http traffic arriving on the server. I accidentaly press enter and have to start over.

  2. There are times that the "Compiled successsfully" is not shown. It stucks at 95%, but odily if you refresh the browser it is working. (some terminal buffering issue I suppose)

Related information

  • Operating system Ubuntu 16.04
  • Branch Master
  • .netcore 1.0.1

UI login test fails when run again (?), because the user is already logged in (?)

Description

When I run build.cmd RunTests again (?), it fails, because the user is already logged in (?)

Repro steps

Please provide the steps required to reproduce the problem

  1. Step A - run build.cmd RunTests

  2. Step B - run build.cmd RunTests

Expected behavior

The test client tests/login with test user should be green

Actual behavior

The test fails

Known workarounds

Logout the user first (PR coming in a minute)

Related information

  • Operating system - Windows
  • Branch - master
  • .NET Runtime, CoreCLR or Mono Version - dotnet 1.0.0-rc3-004530
  • Performance information, links to performance testing scripts

capture

F# web stack - server-side rendering?

This looks awesome. I am excited to try it out sometime soon. I've been doing something very similar, sharing the domain model in .fs files referenced by both Fable .fsx and ASP.NET. The whole thing makes for a very appealing developer experience.

One question, and I'm not even sure if I'm asking it right, but I wanted to try to start a conversation:

Does the F# web stack have any support for server-side rendering?

(e.g. what PHP or ASP.NET Razor do (I think)?)

I don't have any specific need for it, and I'm honestly not familiar at all with the interaction between server-side rendering and single-page-app-type design, as I haven't yet done any non-toy work with SPAs - but it's obviously something that's very widely used in the world, and it's really the only gap I see in the pure F# web development story.

I'm also not that familiar with Suave, so I don't know whether this is part of what it offers, and if so how the server-side-rendering part would interact with Fable.

Curious to hear your thoughts, and keep up the awesome work!

Remove FSharp.Formatting

FSharp.Formatting can be removed from deps since we don't ship docs for a website.
This will allow for huge cleanup in build.fsx

Convert to template?

It may be a good idea to convert the repo to a template so users can create a project easily using dotnet SDK. It would still be possible to clone and use the project directly, though we have to move everything to a Content folder (unless @enricosada knows another possibility).

What do you think? If we make this a template, maybe @MangelMaxime can help with that?

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.