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
cython skipping (build optimization) #2180
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
I have seen this issue before and I believe the new caching code is at fault, so it should be assigned to Bobby Moretti. I have speculated that if you patch in a new file the time stamp of the new file is too old for the precomputed hashes to be recomputed. Cheers, Michael |
comment:3
Replying to @sagetrac-mabshoff:
Micheal, I think you're dead on. This is actually William's code, but I'm pretty familiar with it and I'll try to implement a fix. -Bobby |
comment:4
Joel, Were you running hg from the command line or were you applying the patch from within Sage? I cannot get the error to reproduce. -Bobby |
comment:7
I do not know how to reproduce this. I've tried what you suggested and I can't.
The above just computes a hash of all cython related files in all subdirectories. So I can't understand how to reproduce your bug. Could you please please find a systematic way to reproduce it, so we can fix it? I'm not clever enough to think of anything based on the hints. Did you definitely do WAIT -- idea! I've made a patch based on this idea, and also added a little bit of nice Once again, thanks for reporting these subtle bugs! |
this might (?) completely fix the bug; it also adds some nice timing output |
comment:8
Attachment: sage-2180.patch.gz |
comment:9
This error happened when I created a .pyx file, saved it, then put it into setup.py. This would suggest that William is right about what's going on. |
comment:10
This patch looks good. It does fix the bug in question, but #2295 is also relevant in this case for a bug with the same symptoms, but different cause. Positive review. Cheers, Michael |
comment:11
Merged in Sage 2.10.3.alpha0 |
In 2.10.2.alpha0, there appears to be a small problem with the cython skipping
step. To illustrate the bug:
up-to-date
building 'sage.rings.polynomial.multi_polynomial_factor' extension
error: unknown file type '.pyx'
(from 'sage/rings/polynomial/multi_polynomial_factor.pyx')
sage: There was an error installing modified sage library code.
This appears to arise because the new .pyx file is not in the cache and so the
build optimizer believes that there are no .pyx files to build and just lets
the ordinary disttools do their work. Of course, the ordinary disttools
don't know what to do with .pyx files.
A work-around is to 'touch' a .pyx file anywhere in the tree which is already
in the cache. A build after the touch will build the touch'ed file and the
new file.
CC: @bobmoretti
Component: packages: standard
Issue created by migration from https://trac.sagemath.org/ticket/2180
The text was updated successfully, but these errors were encountered: