Fable daemon parses and compiles whole source on changes

Created on 21 Nov 2017  ·  49Comments  ·  Source: fable-compiler/Fable

Description

dotnet fable yarn-start parses and compiles the whole source on every change to a source file

Repro code

Take any fable-project and start dotnet fable yarn-start.
Modify one file and save.

Expected and actual results

Expected: Only the changed file (and maybe dependent files) are recompiled.
Actual: Everything is compiled again.

Related information

  • Fable version (dotnet fable --version): 1.3.0, 1.3.1

Most helpful comment

OK, here are my findings: the problem seems to be how Webpack is resolving dependencies. In he simple shown by @SCullman before src/Home/View.fs is marked as a dependency of src App.fs. So every time View.fs is updated, App.fs is also recompiled by Webpack to make sure there are no errors in runtime (which can happen with inline functions, changes in the public method names of View.fs, etc).

As it's the last file of the project, obviously App.fs has many more dependencies. And Webpack is recompiling them all but apparently only on Windows. I have to report this to the Webpack team to see what's going on.

In the meanwhile, I've published fable-loader 1.1.5 so you can opt-out the dependencies using the extra.ignoreDependencies option. The drawback is you'll have to make a manual change (like adding a space) in a dependent file if it needs recompilation until we can find a proper solution, but at least the watcher should be much faster. Example:

    module: {
        rules: [
            {
                test: /\.fs(x|proj)?$/,
                use: {
                    loader: "fable-loader",
                    options: {
                        babel: babelOptions,
                        define: isProduction ? [] : ["DEBUG"],
                        extra: { ignoreDependencies: true }
                    }
                }
            },

All 49 comments

Hi @SCullman! Sorry, I cannot reproduce this, in my case only the edited and dependent files are being recompiled. Do you have a repository or a zipped project to test this?

@alfonsogarciacaro Strange, as also others were reporting the same issue in gitter this morning. I will check whether I can reproduce it with a sample project.

Steps to reproduce:

dotnet new fable-elmish-react
.paket\paket update 
yarn
cd src
dotnet restore
dotnet fable yarn-start

and then, when I just touch home/view.fs:
image

Thanks a lot for the repro steps, @SCullman :+1: You need to update also fable-loader, can you add yarn upgrade fable-loader (or just yarn upgrade to update all npm packages) to the steps above and try again?

New attempt on another computer:

dotnet new fable-elmish-react
.paket\paket update 
yarn install
yarn upgrade
cd src
dotnet restore
dotnet fable yarn-start

Same results.

I see the same issue.

Weird, I cannot repro... 😕 Anyone else with this problem? @MangelMaxime @forki

Can't reproduce neither, I followed @SCullman steps and edited the Home\View.fs file.

I got this result:

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
16:15-19 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
172:15-25 "export 'defaultArg' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
185:27-31 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
188:27-31 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj
webpack: Compiled with warnings.
webpack: Compiling...
fable: Compiled src\Home\View.fs
Hash: 64fb89640a7e19c1f870
Version: webpack 3.8.1
Time: 2227ms
                                   Asset      Size  Chunks                    Chunk Names
                               bundle.js      2 MB       0  [emitted]  [big]  main
    0.b7f14501e6aa67373323.hot-update.js   1.77 kB       0  [emitted]         main
    b7f14501e6aa67373323.hot-update.json  43 bytes          [emitted]
                           bundle.js.map   2.19 MB       0  [emitted]         main
0.b7f14501e6aa67373323.hot-update.js.map   1.01 kB       0  [emitted]         main
[./node_modules/webpack/hot ^\.\/log$] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[./src/Home/View.fs] ./src/Home/View.fs 632 bytes {0} [built]
    + 390 hidden modules

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
16:15-19 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/prelude.fs
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
172:15-25 "export 'defaultArg' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
185:27-31 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj

WARNING in C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
188:27-31 "export 'some' was not found in '../../../fable.core/1.3.1/fable-core/Util'
 @ C:/Users/mange/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs
 @ ./src/App.fs
 @ ./src/testDaemon.fsproj
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/testDaemon.fsproj
webpack: Compiled with warnings.

Important part is:

webpack: Compiling...
fable: Compiled src\Home\View.fs

I suspect the warning, about : export 'some' was not found in caused by the new way of Fable to handle option type. @alfonsogarciacaro am I right If yes, just updating the elmish repos should be enough to make them disappear.

Same problem here. It takes ages now to compile bigger projects.

Tried the same as @SCullman above and get

webpack: Compiled with warnings.
webpack: Compiling...
Parsing ./Home/View.fs...
Parsing ./App.fs...
fable: Compiled src\App.fs
Parsing ./Counter/View.fs...
Parsing ./Types.fs...
Parsing ./Info/View.fs...
Parsing ./Navbar/View.fs...
fable: Compiled src\Types.fs
fable: Compiled src\Counter\View.fs
fable: Compiled src\Info\View.fs
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish/1.0.0/fable/program.fs...
fable: Compiled src\Navbar\View.fs
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish.react/1.0.0/fable/react.fs...
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish.debugger/1.0.0/fable/debugger.fs...
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish.react\1.0.0\fable\react.fs
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish.browser/1.0.0/fable/navigation.fs...
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish\1.0.0\fable\program.fs
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs...
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish.debugger\1.0.0\fable\debugger.fs
Parsing ./State.fs...
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish.browser\1.0.0\fable\navigation.fs
Parsing ./Home/View.fs...
Parsing ../../../Users/rsachse/.nuget/packages/fable.elmish.react/1.0.0/fable/common.fs...
fable: Compiled src\State.fs
fable: Compiled src\Home\View.fs
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish.react\1.0.0\fable\common.fs
fable: Compiled ..\..\Users\rsachse\.nuget\packages\fable.elmish.browser\1.0.0\fable\parser.fs

when I change Home/View.fs

yarn info fable-loader gives me version: '1.1.4',

What is your dotnet version ?

2.0.2 on windows

Just tried it on my linux box (with dotnet 2.0.0) and there it works

I am under Windows with 2.0.3.

This is starting to be crazy I have a lot of different behaviour between 2.0.0, 2.0.1, 2.0.2, 2.0.3 in the last couple of days...

Can you please try with 2.0.3 under Windows ?

Edit: To check if this is related to the dotnet version...

Upgraded to 2.0.3 on Windows 10 (1709)
yarn 1.3.2
node 8.6.0/9.2.0

Still the same...

Back at home, upgraded that machine also to dotnet2.0.3 , still the same behavior

Same here. Same problems with dotnet 2.0.3

I see this problem too. dotnet 2.0.3

For references here is the result I get under Linux with dotnet 2.0.3:

webpack: Compiling...
Parsing ./Home/View.fs...
Parsing ./App.fs...
fable: Compiled src/App.fs
Parsing ./Home/View.fs...
fable: Compiled src/Home/View.fs

There a little more line than before under windows but that's seems ok.

Do you guys use a global.json somewhere on your system ?

Do you guys use a global.json somewhere on your system ?

Yes

{
    "sdk": {
        "version": "2.0.3"
    }
}

Do you guys use a global.json somewhere on your system ?

No

I'm on macOS with dotnet SDK 2.0.0 and don't see the problem. Also #1246 says the problem happens from 1.3.0 beta to 1.3.1 but I didn't touch the code to detect dirty files between those versions. Argh!

Hmm, Fable 1.3 uses System.IO.File.GetLastWriteTime to detect dirty files (source). Maybe this gives different results depending on netcore version / platform? @vasily-kirichenko @enricosada

@forki is reporting that Fable stopped working with dotnet SDK 2.0.3 (on Windows I guess) and reverting to 2.0.2 made it work.

@forki is reporting that Fable stopped working with dotnet SDK 2.0.3 (on Windows I guess) and reverting to 2.0.2 made it work.

What do you mean by "stopped working"? I has 2.0.3 and everything works (except the recompilation optimization). Should I downgrade to 2.0.2?

image

basically on a commit which definetely used to work it stopped working today.

Hmm, Fable 1.3 uses System.IO.File.GetLastWriteTime to detect dirty files (source).

FCS switched to UTC timestamps everywhere recently, may this cause the problem?

mhm not sure, because switching dotnet versions solved it

But I assume I will see same issue in 2.0.2 eventually. I guess it's just a "fresh" cache of something

@alfonsogarciacaro could you add logging into https://github.com/fable-compiler/Fable/blob/cda3ae8a97c538b783c961ccb7aa168d695b7b3c/src/dotnet/dotnet-fable/StateUtil.fs#L137 like "xxx.fs is compiling because it's last write time = xxxxx is greater than project time stamp = xxxxx"? (however, I I'm not sure I understand what project.TimeStamp is)

I can reproduce in Windows (both with dotnet 2.0.0 and 2.0.3). I added the log as you suggested @vasily-kirichenko and in my local tests this has revealed the problem is not in that line so it must be somewhere else. Checking right now 👍

@alfonsogarciacaro great! We are waiting for the fix, the pain is huge :)

OK, here are my findings: the problem seems to be how Webpack is resolving dependencies. In he simple shown by @SCullman before src/Home/View.fs is marked as a dependency of src App.fs. So every time View.fs is updated, App.fs is also recompiled by Webpack to make sure there are no errors in runtime (which can happen with inline functions, changes in the public method names of View.fs, etc).

As it's the last file of the project, obviously App.fs has many more dependencies. And Webpack is recompiling them all but apparently only on Windows. I have to report this to the Webpack team to see what's going on.

In the meanwhile, I've published fable-loader 1.1.5 so you can opt-out the dependencies using the extra.ignoreDependencies option. The drawback is you'll have to make a manual change (like adding a space) in a dependent file if it needs recompilation until we can find a proper solution, but at least the watcher should be much faster. Example:

    module: {
        rules: [
            {
                test: /\.fs(x|proj)?$/,
                use: {
                    loader: "fable-loader",
                    options: {
                        babel: babelOptions,
                        define: isProduction ? [] : ["DEBUG"],
                        extra: { ignoreDependencies: true }
                    }
                }
            },

@alfonsogarciacaro thank you so much, I'm back to 2 seconds feedback :)

I've published dotnet-fable 1.3.2, could you please update and give it a try? This version doesn't send dependencies to the JS client (so you don't even need the extra.ignoreDependencies option) but the daemon will keep them and will still recompile dependent files in watch compilation. This way if a change is causing an error in another file, the error will be reported by Webpack.

As a bonus, this should also benefit fable-splitter as it doesn't depend on the client for the dependencies (pun unintended) @forki

BTW, also to @forki, 1.3.2 has been built with dotnet SDK 2.0.3 on Windows, maybe that fixes your problem? 🤔

I tested within a bigger project and made some changes at different files with more or less dependencies.
Awesome job. Thank you!

Works with 2.0.3 on one machine. Will check the other one later today

Am 24.11.2017 08:10 schrieb "Stefan Cullmann" notifications@github.com:

I tested within a bigger project and made some changes at different files
with more or less dependencies.
Awesome job. Thank you!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fable-compiler/Fable/issues/1241#issuecomment-346757401,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNMohglCrLNRcXVtu0d_YfzfGc3dZks5s5mvSgaJpZM4Ql5zA
.

I'm not sure it works completely ok for me.

Project file:

<ItemGroup>
    <Compile Include="Global.fs" />
    <Compile Include="ElasticSearch\Common.fs" />
    <Compile Include="EsScratchPad\View.fs" />
    <Compile Include="Errors\Types.fs" />
    <Compile Include="Errors\Es.fs" />
    <Compile Include="Errors\State.fs" />
    <Compile Include="Errors\View.fs" />
    <Compile Include="Apps\Types.fs" />
    <Compile Include="Apps\State.fs" />
    <Compile Include="Apps\View.fs" />
    <Compile Include="Types.fs" />
    <Compile Include="State.fs" />
    <Compile Include="App.fs" />
  </ItemGroup>

After changing Apps\View.fs I get this output:

webpack: Compiling...
Parsing ./Apps/View.fs...
Parsing ./App.fs...
fable: Compiled src\App.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Navbar.fs...
Parsing ./EsScratchPad/View.fs...
Parsing ./Types.fs...
Parsing ./Errors/View.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish/1.0.0/fable/program.fs...
fable: Compiled src\Types.fs
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish.debugger/1.0.0/fable/debugger.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish.react/1.0.0/fable/react.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/navigation.fs...
fable: Compiled src\EsScratchPad\View.fs
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs...
Parsing ./State.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish\1.0.0\fable\program.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish.react\1.0.0\fable\react.fs
Parsing ./Apps/View.fs...
Parsing ./ElasticSearch/Common.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Layouts/Section.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Components\Navbar.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Layouts/Columns.fs...
fable: Compiled src\State.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Layouts/Column.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish.browser\1.0.0\fable\navigation.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Form.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish.debugger\1.0.0\fable\debugger.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Button.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Common.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Layouts\Columns.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Extra/FontAwesome.fs...
fable: Compiled src\Errors\View.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Icon.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Notification.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Layouts\Section.fs
fable: Compiled src\ElasticSearch\Common.fs
Parsing C:/Users/kirichenko/.nuget/packages/fable.elmish.react/1.0.0/fable/common.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Common.fs
Parsing ./Apps/State.fs...
Parsing ./Errors/State.fs...
fable: Compiled src\Apps\View.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Panel.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish.react\1.0.0\fable\common.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Box.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Message.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Table.fs...
Parsing ./Errors/Es.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Pagination.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Extra\FontAwesome.fs
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Content.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fable.powerpack/1.3.1/fable/src/Fetch.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Menu.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Layouts/Level.fs...
Parsing C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Tag.fs...
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Layouts\Column.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Notification.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Button.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Icon.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Layouts\Level.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Tag.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Components\Menu.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.powerpack\1.3.1\fable\src\Fetch.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Components\Pagination.fs
fable: Compiled src\Errors\Es.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Content.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Form.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Table.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Components\Message.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Components\Panel.fs
fable: Compiled src\Errors\State.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fulma\1.0.0-beta-005\fable\Elements\Box.fs
fable: Compiled src\Apps\State.fs
fable: Compiled C:\Users\kirichenko\.nuget\packages\fable.elmish.browser\1.0.0\fable\parser.fs
Hash: 3311826e924a74e32344
Version: webpack 3.8.1
Time: 3656ms
                                   Asset      Size  Chunks                    Chunk Names
                               bundle.js    2.7 MB       0  [emitted]  [big]  main
    0.42dbebdd1d8a29329817.hot-update.js   33.4 kB       0  [emitted]         main
    42dbebdd1d8a29329817.hot-update.json  43 bytes          [emitted]
                           bundle.js.map   2.55 MB       0  [emitted]         main
0.42dbebdd1d8a29329817.hot-update.js.map   9.24 kB       0  [emitted]         main
[./C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/navigation.fs] C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/navigation.fs 4.73 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs] C:/Users/kirichenko/.nuget/packages/fable.elmish.browser/1.0.0/fable/parser.fs 8.33 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fable.elmish.debugger/1.0.0/fable/debugger.fs] C:/Users/kirichenko/.nuget/packages/fable.elmish.debugger/1.0.0/fable/debugger.fs 8.99 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fable.elmish.react/1.0.0/fable/react.fs] C:/Users/kirichenko/.nuget/packages/fable.elmish.react/1.0.0/fable/react.fs 871 bytes {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fable.elmish/1.0.0/fable/program.fs] C:/Users/kirichenko/.nuget/packages/fable.elmish/1.0.0/fable/program.fs 8.33 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Navbar.fs] C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Navbar.fs 24.2 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Panel.fs] C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Components/Panel.fs 10.3 kB {0} [built]
[./C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Box.fs] C:/Users/kirichenko/.nuget/packages/fulma/1.0.0-beta-005/fable/Elements/Box.fs 787 bytes {0} [built]
[./node_modules/webpack/hot ^\.\/log$] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[./src/App.fs] ./src/App.fs 6.51 kB {0} [built]
[./src/Apps/View.fs] ./src/Apps/View.fs 9.28 kB {0} [built]
[./src/Errors/View.fs] ./src/Errors/View.fs 15.5 kB {0} [built]
[./src/EsScratchPad/View.fs] ./src/EsScratchPad/View.fs 8.99 kB {0} [built]
[./src/State.fs] ./src/State.fs 3.04 kB {0} [built]
[./src/Types.fs] ./src/Types.fs 2.72 kB {0} [built]
    + 400 hidden modules
webpack: Compiled successfully.

3.6 seconds is quite good (but it's longer than it was with extra.ignoreDependencies - 1.7 seconds).

@vasily-kirichenko I've got the same at first. After reinstall Paket deps from scratch everything is ok now.

Now it's 10 seconds... :(

@irium ah! paket install --force?

It's not helped, same time :(

@vasily-kirichenko Please make sure you have 1.3.2 in paket.lock and when running dotnet fable --version. If necessary, delete the obj folder before running dotnet restore.

Is my webpack.config.js OK?

var path = require("path");
var webpack = require("webpack");
var fableUtils = require("fable-utils");

function resolve(filePath) {
    return path.join(__dirname, filePath)
}

var babelOptions = fableUtils.resolveBabelOptions({
    presets: [["es2015", {"modules": false}]],
    plugins: [["transform-runtime", {
        "helpers": true,
        // We don't need the polyfills as we're already calling
        // cdn.polyfill.io/v2/polyfill.js in index.html
        "polyfill": false,
        "regenerator": false
    }]]
});

var isProduction = process.argv.indexOf("-p") >= 0;
console.log("Bundling for " + (isProduction ? "production" : "development") + "...");

module.exports = {
    devtool: "source-map",
    entry: resolve('./src/EsExplorer.fsproj'),
    output: {
        filename: 'bundle.js',
        path: resolve('./public'),
    },
    resolve: {
        modules: [
            "node_modules", resolve("./node_modules/")
        ]
    },
    devServer: {
        contentBase: resolve('./public'),
        port: 8080,
        hot: true,
        inline: true
    },
    module: {
        rules: [
            {
                test: /\.fs(x|proj)?$/,
                use: {
                    loader: "fable-loader",
                    options: {
                        babel: babelOptions,
                        define: isProduction ? [] : ["DEBUG"]
                    }
                }
            },
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: 'babel-loader',
                    options: babelOptions
                },
            },
            {
                test: /\.sass$/,
                use: [
                    "style-loader",
                    "css-loader",
                    "sass-loader"
                ]
            }
        ]
    },
    plugins : isProduction ? [] : [
        new webpack.HotModuleReplacementPlugin(),
        new webpack.NamedModulesPlugin()
    ]
};

Looks good to me.

Deleting obj and dotnet restore solves the problem - 1.5 seconds now. Thanks a lot!

damn obj - It's such a fuckup right now. always the issue

@forki is it dotnet problem or paket or ...?

dotnet

Another question: can I remove all prereleases from packet.dependencies?

Yes, except for Fulma if you use it :) @vasily-kirichenko

OK, thanks. I cannot imagine my life without Fulma :)

Was this page helpful?
0 / 5 - 0 ratings