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

Smarter check #1759

Merged
merged 9 commits into from May 31, 2015
Merged

Smarter check #1759

merged 9 commits into from May 31, 2015

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented May 27, 2015

Fix #1758 and hopefully breaks nothing ;-)

@ralsina
Copy link
Member Author

ralsina commented May 27, 2015

@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)
Copy link
Contributor

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.

Copy link
Member Author

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", '')):
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

@felixfontein
Copy link
Contributor

Before merging: what is that problem with the nikola check -l failure in the tests running on AppVeyor? Is it something Windows specific?

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)
Copy link
Contributor

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?

Copy link
Member Author

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...

@ralsina
Copy link
Member Author

ralsina commented May 28, 2015

The output of the demo site changes because I fixed a broken link generated by the listings plugin, I think.

@felixfontein
Copy link
Contributor

Ah ok. Then everything's fine from my POV :)

ralsina added a commit that referenced this pull request May 31, 2015
@ralsina ralsina merged commit 423f3a7 into master May 31, 2015
@ralsina ralsina deleted the smarter-check branch May 31, 2015 13:58
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

Successfully merging this pull request may close these issues.

Nikola check has a fragile target list
4 participants