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

FileTask#out_of_date? calls depended FileTask#out_of_date? for execution #183

Merged
merged 6 commits into from
Jan 31, 2017

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Dec 28, 2016

This fixes #92 what says below:

The problem seems to stem from the fact that the internal function out_of_date? (in file_task.rb) does not take into account when a file should have updated its timestamp (but didn't, because this is a dry-run).

I think so. In this Pull Request, FileTask#out_of_date? calls dependency FileTask's #out_of_date? via FileTask#needed?.

@@ -29,7 +29,14 @@ def timestamp

# Are there any prerequisites with a later time than the given time stamp?
def out_of_date?(stamp)
@prerequisites.any? { |n| application[n, @scope].timestamp > stamp }
@prerequisites.any? { |p|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p is a name which is in Ruby as Kernel#p. Can you find a good replacement name for the block parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I made a silly mistake. It's as you says. I added a commit 679ccb8.

@coveralls
Copy link

coveralls commented Jan 6, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.574% when pulling 0c712c0 on aycabta:file-dryrun-bug-92 into bc5765f on ruby:master.

@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.574% when pulling ec7dc8f on aycabta:file-dryrun-bug-92 into bc5765f on ruby:master.

1 similar comment
@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.574% when pulling ec7dc8f on aycabta:file-dryrun-bug-92 into bc5765f on ruby:master.

@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.574% when pulling 7be2c78 on aycabta:file-dryrun-bug-92 into bc5765f on ruby:master.

rake "-n"
assert_equal(%w{fileA fileB fileC default}, dryrun_tasks)
rake
sleep 1 # for stride seconds surely for timestamp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a passer-by reading this comment. I'm confused by it. Can you reword it, to make it less ambiguous?

What I believe it wants to say: Ensure the timestamp is on a new second.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I added a commit to fix the comment!

@coveralls
Copy link

coveralls commented Jan 24, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.574% when pulling 2346bc8 on aycabta:file-dryrun-bug-92 into bc5765f on ruby:master.

@hsbt hsbt merged commit 5ba97af into ruby:master Jan 31, 2017
@aycabta aycabta deleted the file-dryrun-bug-92 branch February 5, 2017 07:34
grzuy added a commit to grzuy/rake that referenced this pull request Feb 7, 2018
This reverts commit 5ba97af, reversing
changes made to bc5765f.

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

Successfully merging this pull request may close these issues.

Rake -n does not mark dependents for Execution
4 participants