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

version 10.3.1 file task run as normal task and rebuilding everytime #364

Closed
colinqq opened this issue Nov 21, 2019 · 10 comments
Closed

version 10.3.1 file task run as normal task and rebuilding everytime #364

colinqq opened this issue Nov 21, 2019 · 10 comments

Comments

@colinqq
Copy link

colinqq commented Nov 21, 2019

To see issue run using latest jake version installed with npm install -g jake:
jake -f ./jakefile.js host_init_phony
jake -f ./jakefile.js host_init_phony
example jakefile.js

let fs = require('fs');
file('host_init_phony', function(){
  console.log('file phony start');
  fs.writeFileSync('host_init_phony', '');
  console.log('file phony end');
});
console.log('file phony loaded');
@mde
Copy link
Contributor

mde commented Nov 21, 2019

Thanks very much for reporting this. I found this same issue yesterday, and am working on a fix.

@mde
Copy link
Contributor

mde commented Nov 23, 2019

Fixed in 00ee2a0 and pushed to NPM v10.3.2.

@mde mde closed this as completed Nov 23, 2019
@colinqq
Copy link
Author

colinqq commented Nov 24, 2019 via email

@mde
Copy link
Contributor

mde commented Nov 24, 2019

I cannot reproduce what you're seeing. Is it possible you haven't updated Jake? What do you see when you run jake -v?

Here is what I get with your sample Jakefile, and current master HEAD (bin/cli.js is the jake binary):

$ ../jake/bin/cli.js host_init_phony
file phony loaded
Starting 'host_init_phony'...
file phony start
file phony end
Finished 'host_init_phony' after 2 ms
$ ../jake/bin/cli.js host_init_phony
file phony loaded

As you can see, the second time around, the only thing printed to stdout is "file phony loaded," which you are printing at the global level of the Jakefile.

@colinqq
Copy link
Author

colinqq commented Dec 17, 2019 via email

@colinqq
Copy link
Author

colinqq commented Dec 17, 2019 via email

@mde
Copy link
Contributor

mde commented Jan 17, 2020

Can you give me access to a repo of some code that exhibits this behavior? I can't fix without some sort of repro case.

@colinqq
Copy link
Author

colinqq commented Jan 17, 2020 via email

@colinqq
Copy link
Author

colinqq commented Jan 22, 2020 via email

@mde
Copy link
Contributor

mde commented Feb 25, 2020

I thought this problem was fixed with PR #370. I've just pushed at release with this fix to NPM, v10.4.6. Can you install the latest and see if your problem is resolved?

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

No branches or pull requests

2 participants