-
Notifications
You must be signed in to change notification settings - Fork 462
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
Smarter check #1759
Smarter check #1759
Conversation
@felixfontein I'd like your review of this one |
def _call_nikola_list(site): | ||
files = [] | ||
for task in generate_tasks('render_site', site.gen_tasks('render_site', "Task", '')): | ||
files.extend(task.targets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work if any of the generated tasks has a delayed task loader, but a) probably no plugin author does that, and b) I have to go through that anyway when adjusting this for the earlytask_impl branch, so I vote for leaving this as is for the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
def _call_nikola_list(site): | ||
files = [] | ||
deps = defaultdict(list) | ||
for task in generate_tasks('render_site', site.gen_tasks('render_site', "Task", '')): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe? Are we not doing it twice?
We should probably talk to our task loader anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works anyway. To talk to our taskloader we'd have to move it out of __main__
first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just talk to self.site.doit.task_loader
. You also can save the generated tasks there, if any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it, see no difference, and I don't understand internals well enough, maybe.
So, proposing to merge this as-is.
Before merging: what is that problem with the |
for target in task.targets: | ||
deps[target].extend(task.file_dep) | ||
for task in generate_tasks('post_render', site.gen_tasks('render_site', "LateTask", '')): | ||
files.extend(task.targets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need the lines updating deps[target]
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. Good catch! Fixing...
The output of the demo site changes because I fixed a broken link generated by the listings plugin, I think. |
Ah ok. Then everything's fine from my POV :) |
Fix #1758 and hopefully breaks nothing ;-)