Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest F# Formatting #372

Merged
merged 13 commits into from
Oct 20, 2020

Conversation

wallymathieu
Copy link
Member

@wallymathieu wallymathieu commented Oct 10, 2020

  • upgrade to latest F# formatting
  • make sure that reference docs builds
  • normalize template location with what fsdocs program tool expects

The goal is to be able to upgrade to the latest F# Formatting as seen in #369 but keep the possibility to deploy docs and use the plantuml diagram.

@wallymathieu wallymathieu marked this pull request as ready for review October 11, 2020 06:38
@wallymathieu wallymathieu requested review from gusty and adz October 11, 2020 06:38
@@ -4,16 +4,16 @@
<meta charset="utf-8"/>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this template does not work well, since It's not the one that @adz has fixed. This is simply the minimal effort conversion of template.cshtml to html.

@wallymathieu
Copy link
Member Author

I've rendered the docs here:
https://wallymathieu.github.io/FSharpPlus/
Note that the above rendering is using the template by @adz https://github.com/wallymathieu/FSharpPlus/tree/wally-upgrade-formatting-adz

@@ -193,7 +194,7 @@ let getValidPassword : ResultT<_> =
let askPassword = monad {
do! lift <| putStrLn "Insert your new password:"
let! value = getValidPassword
do! lift <| putStrLn "Storing in database..."
//do! lift <| putStrLn "Storing in database..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this caused an error? ..or maybe it was unintentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking locally, I got:

   docsrc/content/abstraction-monad.fsx: error(197,8)-(197,53) Type constraint mismatch when applying the default type 'obj' for a type inference variable. The type 'obj' does not support the operator 'Lift' Consider adding further type constraints

Adding type constraint didn't help -- I got "Value restriction".
Changing lift -> liftAsync doesn't help either.

I resolved it by passing unit:

let askPassword () = monad {
...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should apply your fix to the docs.

Copy link
Contributor

@adz adz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should merge. Some of the doc issues may have been present before, or not, but we can resolve separately. They still generate a doc.

@wallymathieu wallymathieu merged commit 29b63ef into fsprojects:master Oct 20, 2020
@wallymathieu wallymathieu deleted the wally-upgrade-formatting branch October 20, 2020 06:15
wallymathieu added a commit that referenced this pull request Oct 23, 2020
* Update to latest F# Formatting

* Using fsdocs tool

* Fix for type inference issues

* Sample compilation error in fsx added to tests

* F# markdown content instead of evaluation

* Use template from @adz branch

Co-authored-by: Adam Davies <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants