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

Always including base post as dependency (#2956) #3072

Merged
merged 4 commits into from May 4, 2018
Merged

Always including base post as dependency (#2956) #3072

merged 4 commits into from May 4, 2018

Conversation

@felixfontein
Copy link
Contributor

@felixfontein felixfontein commented May 4, 2018

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

Fixes #2956.

(self.base_path equals cache/posts/test.es.html in sample of #2956.)

@felixfontein felixfontein requested review from ralsina and Kwpolska May 4, 2018
@felixfontein felixfontein added this to the v8.0.0 milestone May 4, 2018
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 4, 2018

#3073 needs a more resilient solution.

% for i in $(seq 1 100); do nikola console -c "print(site.timeline[0].base_path)"; done
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.es.html
Scanning posts........done!
cache/posts/test.es.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.es.html
Scanning posts........done!
cache/posts/test.es.html
Scanning posts........done!
cache/posts/test.es.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.de.html
Scanning posts........done!
cache/posts/test.es.html
In [3]: site.timeline[0].deps('de')
Out[3]:
['cache/posts/test.de.html',
 'cache/posts/test.de.html',
 'posts/test.de.rst',
 'posts/test.de.rst']

In [4]: site.timeline[0].deps('en')
Out[4]: ['cache/posts/test.de.html', 'posts/test.de.rst']

In [5]: site.timeline[0].deps('es')
Out[5]:
['cache/posts/test.de.html',
 'cache/posts/test.es.html',
 'posts/test.de.rst',
 'posts/test.es.rst']
In [1]: site.timeline[0].deps('es')
Out[1]:
['cache/posts/test.es.html',
 'cache/posts/test.es.html',
 'posts/test.es.rst',
 'posts/test.es.rst']

In [2]: site.timeline[0].deps('de')
Out[2]:
['cache/posts/test.de.html',
 'cache/posts/test.es.html',
 'posts/test.de.rst',
 'posts/test.es.rst']

In [3]: site.timeline[0].deps('en')
Out[3]: ['cache/posts/test.es.html', 'posts/test.es.rst']

In [4]: site.timeline[0].deps('es')
Out[4]:
['cache/posts/test.es.html',
 'cache/posts/test.es.html',
 'posts/test.es.rst',
 'posts/test.es.rst']
@felixfontein
Copy link
Contributor Author

@felixfontein felixfontein commented May 4, 2018

Ok, this now also includes a fix for #3073. I also added a sorted() to avoid different file system enumeration orders causing rebuilds (glob.glob() makes no guarantees on the order of its result; see https://docs.python.org/3/library/glob.html).

@felixfontein
Copy link
Contributor Author

@felixfontein felixfontein commented May 4, 2018

@Kwpolska I think the sorted() does that :)

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 4, 2018

Yeah, that will do.

@felixfontein
Copy link
Contributor Author

@felixfontein felixfontein commented May 4, 2018

I guess we should also backport this to v7. (Should be straightforward, anyway.)

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 4, 2018

Sure, will do tomorrow. Tomorrow is also when v8-beta will go out (after #3071 gets merged).

felixfontein added a commit to getnikola/plugins that referenced this pull request May 4, 2018
@Kwpolska Kwpolska merged commit 49aa484 into master May 4, 2018
0 of 5 checks passed
0 of 5 checks passed
Codacy/PR Quality Review Hang in there, Codacy is reviewing your Pull request.
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@Kwpolska Kwpolska deleted the fix-2956 branch May 4, 2018
Kwpolska added a commit that referenced this pull request May 4, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants