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

@felixfontein felixfontein May 27, 2015

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

@ralsina ralsina May 27, 2015

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

@Kwpolska Kwpolska May 28, 2015

Is this safe? Are we not doing it twice?

We should probably talk to our task loader anyways.

Copy link
Member Author

@ralsina ralsina May 28, 2015

It works anyway. To talk to our taskloader we'd have to move it out of __main__ first.

Copy link
Member

@Kwpolska Kwpolska May 28, 2015

You can just talk to self.site.doit.task_loader. You also can save the generated tasks there, if any.

Copy link
Member Author

@ralsina ralsina May 28, 2015

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

@felixfontein felixfontein commented May 28, 2015

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

@felixfontein felixfontein May 28, 2015

Don't you need the lines updating deps[target] here as well?

Copy link
Member Author

@ralsina ralsina May 28, 2015

You are correct. Good catch! Fixing...

@ralsina
Copy link
Member Author

@ralsina 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

@felixfontein felixfontein commented May 28, 2015

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

@ralsina ralsina merged commit 423f3a7 into master May 31, 2015
0 of 3 checks passed
@ralsina ralsina deleted the smarter-check branch May 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants