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
Move CYTHON_CACHE_DIR to a Sage specific directory #25293
Comments
Branch: u/saraedum/cycache |
comment:2
jdemeyer: I think you know well how sage-env is supposed to work. Do you think this is the right way of doing this? New commits:
|
Commit: |
comment:3
I don't agree with this:
If Cython gives the same fingerprint for different Cython versions, that's clearly a bug in Cython. |
comment:4
The version is part of the fingerprint but any patches that we add are not part of the fingerprint. |
comment:5
Replying to @saraedum:
Well, then it's still a bug. Where in the upstream code is this check being done? |
comment:6
I don't see the need for a Sage-specific cycache directory. We don't do that for ccache either. |
comment:7
Replying to @jdemeyer:
I don't think it's a bug. Upstream makes sure that released versions of cython work properly. If you start to patch them, then you are on your own. |
comment:8
Replying to @jdemeyer:
I think we do that for ccache (see the line just above the one I am adding here.) But I am very happy not to introduce a sage-specific cycache. (It was mentioned in #17851 that we should do that.) |
comment:9
Replying to @saraedum:
That's |
comment:10
Replying to @saraedum:
I'm not following you here... of course we will make sure that the Cython-in-Sage works correctly. What I'm asking is the following: is it possible for two different Cython installations that produce different C code to accidentally re-use the same cache file?
I don't know exactly how ccache solves this problem, but it seems to work: you can mix GCC versions and ccache knows the difference. |
comment:11
Say if we backported a patch (without changing Cython's version number - and it is unrealistic to assume that people will remember to change that version number) then it is likely that our Cython and the official Cython behave somewhat differently. If that difference in behaviour is "after" the cache lookup, then you "break" Cython caching in some sense. But that's an academic discussion. In practice this won't happen. Is it possible for two released versions of Cython to use the cache incorrectly, ideally not anymore; and sure, if it were then it would be a bug in Cython. Let's close this issue. |
comment:12
Replying to @saraedum:
Yes, that's basically what I have been saying all the time on this ticket. |
Currently the Cython cache (disabled) would be written to ~/.cycache and ~/.cython/inline. Since Sage ships its own (possibly patched) version of Cython, we should not mix our cache with the cache of the Cython that might be installed by the distribution or the user.
CC: @jdemeyer
Component: cython
Author: Julian Rüth
Branch/Commit: u/saraedum/cycache @
51d813a
Issue created by migration from https://trac.sagemath.org/ticket/25293
The text was updated successfully, but these errors were encountered: