Closed MangelMaxime closed 6 years ago
Wow, 226 files! I didn't know this repo had so many ;) I gave it a try and it seems to work. I had to make some minor edits to fcs.file
and there was also an error from UglifyJS when running the Build.App target, but we can fix that late, so I say: let's merge this! :)
Thanks a lot for the awesome work! :clap: :clap: :heart: :tada:
We are tracked the metadata2
files and their is a lot. :)
Ah, yes I didn't test the Build.App hihi was only using dev mode.
Nice to have it merge, can now play with it :)
Ok, so here is my proposition for the build system of this repo.
Requirements
The new build system use yarn instead of npm because it's faster to install the packages. And we now switched Fable repo to yarn again as we know how to use it over the CI servers.
Metadata
First, I took the decision to not force the user to build the metadata each time. Because, they should not change much I created a target
Generate.Metadata
.This target will:
FSharp.Compiler.Service_export
folder setup. Will just check for it's existance not which branch is used etc. If not found, will ask the user if we can add it for him.Util.js
manually, but we add one or two metadata should be easy because the git diff will help us. In the future, we will have another way to include metadata so we can include others lib or metadata dynamically perhaps.Build the repo
When build the Fable.FCS or the application, we first check if
FSharp.Compiler.Service_fable
andFable
directories exist. After, same process has before.Then we have this build order:
I also added a target
Watch.App
but this will trigger almost all the previous target. This is useful, when you first clone the repo for example.If you are using this repo in dev mode you should keep using
yarn start-app
,yarn watch-fcs
, etc.Continuous Integration
For the CI, if we start run
build.cmd All setup=auto
then, the missing directories (FSharp.Compiler.Service_fable, Fable, etc.) will be added without any user interaction.With all this changes, getting this repo to work should be a lot easier and we also, should be able to support CI. At least, to check if everything is building. Test a the runtime is another thing for another day :D
Also, this also means that for this repo
fable
andexport
branches or ncave fork should always be "stable". Which is already more or less the case as we consider them as the "master" branch depending on our need.Please tell me if you have any question or if I need to adapt something.
When or after merging, this PR we should update the README.md with explanation on how to get started.
PS: I am not sure, but perhaps we can remove some of the metadata references added to the util.js
@ncave I am also having this log in the browser console when running a program:
This is working even with this message but if we can get ride of them would be better IMO.