-
Notifications
You must be signed in to change notification settings - Fork 300
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
Fable daemon parses and compiles whole source on changes #1241
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. |
Thanks a lot for the repro steps, @SCullman 👍 You need to update also fable-loader, can you add |
New attempt on another computer:
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 I got this result:
Important part is:
I suspect the warning, about : |
Same problem here. It takes ages now to compile bigger projects. Tried the same as @SCullman above and get
when I change Home/View.fs
|
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) 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:
There a little more line than before under windows but that's seems ok. Do you guys use a |
Yes
|
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 |
@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? |
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 Fable/src/dotnet/dotnet-fable/StateUtil.fs Line 137 in cda3ae8
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 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 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 As a bonus, this should also benefit fable-splitter as it doesn't depend on the client for the dependencies (pun unintended) @forki
|
I tested within a bigger project and made some changes at different files with more or less dependencies. |
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
<#1241 (comment)>,
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
3.6 seconds is quite good (but it's longer than it was with |
@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! |
It's not helped, same time :( |
@vasily-kirichenko Please make sure you have 1.3.2 in paket.lock and when running |
Is my 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 |
damn obj - It's such a fuckup right now. always the issue |
@forki is it |
dotnet |
Another question: can I remove all |
Yes, except for Fulma if you use it :) @vasily-kirichenko |
OK, thanks. I cannot imagine my life without Fulma :) |
Description
dotnet fable yarn-start
parses and compiles the whole source on every change to a source fileRepro 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
dotnet fable --version
): 1.3.0, 1.3.1The text was updated successfully, but these errors were encountered: