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

Made fscd a dotnet CLI tool "fabulous-cli" + Unit tests ran on FAKE build #247

Merged
merged 6 commits into from
Dec 11, 2018

Conversation

TimLariviere
Copy link
Member

Making this PR mostly to test CI.

Fixing fscd.Tests to run on all platforms and run it as part of the build process.
2 tests have been disabled because of a known limitation of FSharp.Compiler.Service.

Also had to make fscd.Tests a .NET Core library to run outside of Visual Studio (FAKE 5 can't run MSTest v2 on MacOS, even though VSfM can run it)
So I also made fscd a .NET Core app which change the way we run it
mono fscd.exe --watch => dotnet fscd.dll --watch

@TimLariviere
Copy link
Member Author

TimLariviere commented Dec 9, 2018

Tests are running. Great.

I'll take a look at converting fscd as a dotnet global tool.
Didn't notice the bug #119, FsPickler has been replaced by Newtonsoft.Json.

@TimLariviere
Copy link
Member Author

TimLariviere commented Dec 9, 2018

And now it's a dotnet cli tool, which allows to do that on all platforms

dotnet tool install -g fabulous-cli
fabulous --watch --webhook:http://localhost:9867/update

Hopefully, this will close #120 and #141 as well.
Tested it successfully against :

  • Visual Studio for Mac 7.7
  • Visual Studio 2019 for Mac Preview 1
  • Visual Studio 2017 15.9
  • Visual Studio Code

Visual Studio 2019 Preview 1 can't load the Fabulous repository.
It's stuck on loading TicTacToe.iOS

@TimLariviere TimLariviere changed the title [WIP] Trying to make unit tests run as part of the build process Made fscd a dotnet CLI tool "fabulous-cli" + Unit tests ran on FAKE build Dec 9, 2018
@TimLariviere
Copy link
Member Author

@nosami @jimbobbennett @dsyme
Could you give a try to the new dotnet cli tool, please?
The FileSystemWatcher seems to work every time now.

Steps to install your own fabulous-cli

cd src/Fabulous.Cli
dotnet pack
dotnet tool install -g --add-source bin/Debug/ fabulous-cli
cd /path/to/your/app
fabulous --watch --webhook:http://localhost:9867/update

Thanks

@nosami
Copy link

nosami commented Dec 10, 2018

I just gave this a try.

Changes to any file in the source folder (made with VSMac) were detected immediately and it was very stable. 💯

@nosami
Copy link

nosami commented Dec 10, 2018

I tried to do this a few months ago but back then there were serialization differences between Mono running on the device and dotnet running in the watcher that meant this wasn't possible.

On dotnet core, the serialized types referred to System.Private.CoreLib which isn't available on Mono.

I'm not sure if this issue has been resolved - I need to check if there are issues in the emulator when refreshing.

@nosami
Copy link

nosami commented Dec 10, 2018

I updated Elmish.Calculator to the latest Fabulous dependencies and it is working really well, so not sure what changed between July and Now :)

Live reload is now extremely quick too.

fscd

@TimLariviere
Copy link
Member Author

That's really good to hear. :)

@dsyme
Copy link
Collaborator

dsyme commented Dec 11, 2018

@TimLariviere @nosami Sorry I've been a bit out of the loop due to a trip to Redmond. Hoping to get back into Fabulous in the next few days before Xmas vacation

@dsyme
Copy link
Collaborator

dsyme commented Dec 11, 2018

I looked through.... this work is absolutely .... yes... you know what I'm about to say...

Absolutely Fabulous!

@jimbobbennett
Copy link

Just tried it on one of my projects and get errors, but also got errors with the old watcher. Seems it doesn’t like a timer subscription... will raise an issue for it.

@TimLariviere
Copy link
Member Author

Ok, this sounds good. Did another successful set of manual tests with fabulous-cli. :)
I'm merging it and will release v0.29

There's a lot of limitations with LiveUpdate I think we should track as issues, to see if we can fix them.
E.g. multi-files projects, changes to fsproj, current model reloading and messages not dispatching after a reload, to name a few.

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.

4 participants