SAFE-BookStore icon indicating copy to clipboard operation
SAFE-BookStore copied to clipboard

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

Open cartermp opened this issue 8 years ago • 12 comments

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.

cartermp avatar Aug 28 '17 16:08 cartermp

Yarn or npm are pretty common on Web projects Regarding mono. I'm not sure if this can be done easily. /cc @enricosada @matthid

Am 28.08.2017 6:09 nachm. schrieb "Phillip Carter" <[email protected]

:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fable-compiler/fable-suave-scaffold/issues/149, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNCTazFeEDtSEVnTVEs8-q52l1gpHks5scuZPgaJpZM4PEuxs .

forki avatar Aug 28 '17 16:08 forki

npm 5 already has a lock file (though there seem to be differences depending on the OS which is a bit frustrating) so it could be possible to remove Yarn for simplification, as npm comes bundled with node.

However, I don't know possible solutions to install mono and node locally either (there's a node/npm package in Nuget but it's very old). The easiest way is make them global requirements.

alfonsogarciacaro avatar Aug 28 '17 17:08 alfonsogarciacaro

node/npm/yarn can be installed somehow via build script (probably by downloading&extracting an official zipfile or something like it). Regarding mono I'm a bit skeptical as well just because of the size alone of the distribution. It's probably easier to switch everything to netcore...

matthid avatar Aug 28 '17 17:08 matthid

Is Mono for running FAKE, or is that just to make it easier for folks when they use VSCode?

FYI I'd treat this as a more low-priority issue. Nice to have, but given that the target audience of Fable isn't necessarily Windows developers who have never used Node before, I think global requirements are fine.

cartermp avatar Aug 28 '17 17:08 cartermp

Currently a lot of stuff and tools like test runner have not been ported yet, so you need mono often for several reasons. If I'd release FAKE 5 today you still most likely need it for a lot of tools FAKE is executing in your build ... So it will take time and some people willing to switch and do the ports to make it all work again

matthid avatar Aug 28 '17 17:08 matthid

Yes even with fake and paket ported to netcore, we still depend on things like canopy which depends on selenium. I think that's not netcore at the moment.

forki avatar Aug 31 '17 08:08 forki

For Node there's now an updated NuGet (8.9.1 https://www.nuget.org/packages/Node.js.redist/) and an MSBuild wrapper for Yarn (https://github.com/natemcmaster/Yarn.MSBuild). We've been happily using these to simplify the install requirements for colleagues unfamiliar JavaScript tooling and also keep build agents clean of a global node install.

cgravill avatar Dec 07 '17 14:12 cgravill

Paket is going netcore soon, 1month? Canopy is wip for netcore (selenium is netcore) there is a PR to finish

enricosada avatar Dec 07 '17 15:12 enricosada

As a note, paket will add repo level tools (netcore and net) in the same timeframe, so will be easier for add stuff like fake.

dotnet fable will become just fable but continue to be netcore based (no real changes), and will work in any directory (not just proj dir)

enricosada avatar Dec 07 '17 15:12 enricosada

Editor side FSAC is netcore already. Ionide in vscode can run netcore only ( with a setting), and in beta atm. Fsac based editor (vim, emacs) will follow easy, really small change, just bundling

So hopefully January can be ok to remove net/mono as dep, with an easier setup

enricosada avatar Dec 07 '17 19:12 enricosada

Wow, that's just awesome @enricosada! :clap: 🥇 :clap:

BTW, I've been using the Ionide netcore setting on macOS since it was released and I haven't see any problem 😸

alfonsogarciacaro avatar Dec 07 '17 19:12 alfonsogarciacaro

Yes Enrico is doing great work here

Am 07.12.2017 20:20 schrieb "Alfonso Garcia-Caro" <[email protected]

:

Wow, that's just awesome @enricosada https://github.com/enricosada! 👏 🥇 👏

BTW, I've been using the Ionide netcore setting on macOS since it was released and I haven't see any problem 😸

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SAFE-Stack/SAFE-BookStore/issues/149#issuecomment-350067472, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNPS1HXWCH3PZe7YXl2W0Jkq3QT56ks5s-DqIgaJpZM4PEuxs .

forki avatar Dec 08 '17 06:12 forki