-
Notifications
You must be signed in to change notification settings - Fork 155
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
[WIP] Add Suave hosting for FSAC #74
Conversation
|
||
[<EntryPoint>] | ||
let main argv = | ||
let mutable state = FsAutoComplete.State.Initial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you use a ref here instead, so that it compiles with F# 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Wow, this a significant chunk of work, great! I'm very happy to accept such a pull request, with or without tests, hopefully you can find time to add them conveniently at a later date. I have a few comments.
|
OK, so next part of work:
|
Looks like last fix, has broken build on windows 🙄 |
Yeah I hate these app.config/versioning issues. FsUnit is sometimes really bad like this, luckily it isn't involved here. New PR sent over. |
Use FSharp.Core 4.3.0.0 throughout
Looking good! How would you like to handle releases? If you add the necessary logic to the FAKE script then I can release both at once to https://github.com/fsharp/FsAutoComplete/releases easily. Also, this won't impact me merging it, but won't you lose the ability to send unsolicited messages, like |
I actually haven't thought about releases... Probably best way would be to release 2 separate zips for that - one with Console App, second with Suave. I don't know if it might be done as part of one GitHub tag/release or will we need 2? If error / info is result of command it will be send as (part of) response. And to the other potential errors - haven't seen one since update to Change to HTTP makes clearer request -> response cycle, which makes stuff in Atom ... and other node.js based tools ... easier. I also hope web based server will enable other cool stuff - I know @dsyme mentioned some time ago building new, not Silverlight-based TryFsharp. I guess it can be also usable for @tpetricek projects - FsSnippet (if new version would include "richer" F# editor) or TheGamma which already have web based F# editor. |
For now, yes let's just do two separate zips on the same tag. That makes it really easy to release, and if there are no changes for one or the other of the frontends in a release that's fine, editors don't need to update. Can you see how to adjust the logic in the FAKE script for that?
Doesn't this mean the |
I agree the other stuff sounds great! |
Yep, i will take a look at it. It shouldn't be difficult to add second zip to release.
HTTP request is always non-blocking in JavaScript, I'm sending a request, get promise of result and just define what happens when it's resolved - it makes things much easier than continue listening on stdio and interpreting incoming from there strings. |
Great, thanks for the explanation. That does sound nice to work with! |
Haven't tested whole release cycle (as don't have write rights here) but looks like it should be working. |
|
||
let buildDir = project + "/bin/Debug/" | ||
let buildReleaseDir = project + "/bin/Release/" | ||
let integrationTestDir = project + "/test/integration/" | ||
let releaseArchive = "fsautocomplete.zip" | ||
|
||
let suaveSummary = "A Suave web server for interfacing with FSharp.Compiler.Service over a HTTP." | ||
let suaveProject = "FsAutoComplete.Suave" | ||
let suaveBuildDebugDir = suaveProject + "/bin/Release" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Thanks, I'm going to merge and release. I found some strange issue though with it rebuilding FsAutoComplete.Suave each time, because the timestamp for Suave.dll downloaded by Paket was in 2017! |
[WIP] Add Suave hosting for FSAC
Hurrah! 😂 ;) |
:) |
Hey,
So this is my huge PR we've discussed through email. Basically it does 3 things -
It's still work in progress - no integration tests for Suave app, hard-coded port for Suave server, one "failing" integration test for console app (however I'm not sure how important it is), some random changes in solution files for integration tests (not sure how I've managed to change it) - but it's pretty much fully usable - console application is working exactly the same as current one, and Suave app is providing exactly same functionalities - I've already have
Ionide-fsharp
fork (https://github.com/ionide/ionide-fsharp/tree/suave) using it and it's working well.