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

Delayed updating of compiled content #20

Open
unwitting opened this issue Sep 27, 2015 · 4 comments
Open

Delayed updating of compiled content #20

unwitting opened this issue Sep 27, 2015 · 4 comments
Assignees

Comments

@unwitting
Copy link
Collaborator

Me again, more lovely buggage. Steps to illustrate:

  • src/test.jsx looks like:
const a = 'a';
  • Run:
$ fusile src srv

(with or without --watch src/test.jsx)

  • First read is as expected:
$ cat srv/test.js
'use strict';

var a = 'a';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTSxDQUFDLEdBQUcsR0FBRyxDQUFDIiwiZmlsZSI6Ii9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4In0=
  • Edit src/test.jsx to:
const a = 'abc';
  • Next read is out of date:
$ cat srv/test.js
'use strict';

var a = 'a';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTSxDQUFDLEdBQUcsR0FBRyxDQUFDIiwiZmlsZSI6Ii9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4In0=
=
  • Next read is as expected:
$ cat srv/test.js
'use strict';

var a = 'abc';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTSxDQUFDLEdBQUcsS0FBSyxDQUFDIiwiZmlsZSI6Ii9Vc2Vycy9qYWNrcHJlc3Rvbi90bXAvc3JjL3Rlc3QuanN4In0=
@Munter
Copy link
Owner

Munter commented Sep 27, 2015

Was your update that didn't correctly get shown by any change made within 1000ms of the last time you updated the file? I have a known issue with the file system only providing second granularity on time, meaning I can't detect file updates within the same second. I probably need to adjust the caching mechanism to not trust cache within the same second as the current read

@unwitting
Copy link
Collaborator Author

Nah, can leave it as long as possible - first read is out of date, subsequent ones are fine.

@Munter
Copy link
Owner

Munter commented Sep 27, 2015

Hmm :(

Do you have time to recreate the setup with that specific file in the fixtures and in https://github.com/Munter/fusile/blob/master/test/cache-test.js so there is a failing test? Pseudo code comments would be fine, just so I know what sequence I need to implement. I know the tests are not particularly to write with all the crazy race condition timeouts :/

@unwitting
Copy link
Collaborator Author

PR #24 - working test there, description copied below:

Submitted test - it actually now passes on my machine (as does my original manual case) but that feels very ropey so I think it's still best to pin it down with a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants