fslaborg / fslaborg.github.io

The fslab website
https://fslab.org
MIT License
11 stars 15 forks source link

Build failing #46

Closed HarryMcCarney closed 1 year ago

HarryMcCarney commented 1 year ago

Trying to run the site locally to investigate how blog posts could be created.

cloned repo and ran Fornax build

got multiple warnings/errors and the tutorials aren't generated. Error message below.

[Tutorial-Loader]: Done loading base tutorial path Load Errors: [|C:\Users\harry\fslab\src\generators\layout.fsx (95,20)-(95,109) typecheck warning The syntax '[expr1][expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'.; C:\Users\harry\fslab\src\generators\layout.fsx (97,20)-(97,167) typecheck warning The syntax '[expr1][expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'.|] [21:46:53] 'C:\Users\harry\fslab\src_public\tutorials.html' generation failed Generated site with errors. Waiting for changes... [21:46:54] Watch mode started. Press any key to exit. [21:46:54 INF] Smooth! Suave listener started in 50.644ms with binding 127.0.0.1:808

Running on dotnet 6 and windows 11.

kMutagene commented 1 year ago

the blog post generator uses fsdocs as a dotnet cli, so that not being installed might be the issue https://github.com/fslaborg/fslaborg.github.io/blob/e7e9f9c9040b2324ff817854f6606ecf64a79a8e/src/generators/tutorials.fsx#L97-L102

also, this site needs both .net 3.1 and 5.

However, i am currently rebuilding the website and blog from the ground up, so i wouldn't bother too much with the site in it's current state. The updated version will generate posts from notebooks directly instead of scripts.

It might be worth just taking a look at fsdocs itself, which is the tool used here anyways. it creates html sites from scripts: https://github.com/fsprojects/FSharp.Formatting. You can also take a look at https://plotly.net docs, which are generated with this tool as well

kMutagene commented 1 year ago

@HarryMcCarney I have the new blog up and running in principle. It converts F# notebooks to html. I still have to get the general styling done, but you can have a look at the general workflows here and the site in it's current state here: https://fslab.org/blog

HarryMcCarney commented 1 year ago

Thanks @kMutagene, a neat approach! Struggling to get it running. Installed anaconda and after some issues with PATH variables got as far as fornax watch. Am using .Net 6.0.401

image
kMutagene commented 1 year ago

du you by any chance check out as-is via git (meaning there are still unix new line characters in the file instead of windows CRLF?)

kMutagene commented 1 year ago

because a blank clone should always work, as it does work on a blank ci machine

kMutagene commented 1 year ago

@HarryMcCarney This should be fixed for you in the latest version, as i added line ending normalization before parsing posts, if the issue persist, can you please open a new issue over at https://github.com/fslaborg/blog ?

HarryMcCarney commented 1 year ago

Hi @kMutagene, I wanted to test the CRLF issue this morning but you beat me to it. I have cloned the new repo and it runs without problems on my machine. Thanks!