-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
sage's spkg sources should use correct include paths instead of having ../../../../whatever everywhere #12728
Comments
comment:2
I don't like attachment: compile_with_no_up_in_includes.patch. I would prefer the patch to add only |
comment:3
There are two problems with "../../../../.." :
It's better to have the build system provide ten "-I" flags than having a thousand places in the code where those ten paths are engraved, for maintainability reasons. |
comment:4
Please fill in your real name as Author. |
Author: Julien Puydt |
comment:6
Some dedication here. The second patch at least will need rebasing against at least 5.2. I am not sure you should add all these paths to CYTHON_INCLUDE_DIRS. Is there a reason why they are not in their own variable. Do you need all these and not just SAGE_ROOT + '/devel/sage/sage/'? |
comment:7
Yes, it's now old and deprecated. And yes, I think it was needed to add all those paths. I plan to rework on the matter differently -- the question is when. The plan would be to have some script with a list of the included headers with their full paths and their wanted path, which would normalize the paths in includes. That might still require changing CYTHON_INCLUDE_DIRS, but hopefully adding less paths. |
comment:9
On Sage-devel, you reported that by changing the include paths the answers to some doctest in sage.misc.sageinspect changed. I'll see where that comes from, but I guess sageinspect needs a fix concerning temporary Cython code anyway. |
comment:10
See #13916. |
comment:11
That shell script has a bug where everything before stdsage.pxi might get eaten -- that is the reason why there's a failing doctest. Not ready for review yet :-P |
Attachment: updirectories-sed.sh.gz Shell script which patches 99,99% of the issues |
comment:12
Ok, the new version of the updirectories-sed shell script passes all doctests: it needs review. It won't fix 100% of the problem, but the rest can be patched by hand, at it concerns only a handful of cases. |
comment:13
Please make it clear what should be applied. |
comment:14
The updirectories-sed.sh shell script needs to be reviewed:
|
comment:15
I think that's not how we want to proceed hence, Jeroen's question. Having the script is nice for testing but once you have run it you should generate a patch with mercurial and post it here for inclusion. |
comment:16
I'll generate an mercurial patch if that is what you want. It will be thousands of lines long, but if you prefer to review that... every taste is in nature. |
comment:17
Size of the patch is just a technical problem. It just makes it harder to find a problem if there is any but no more so than with just applying your script. |
comment:18
Replying to @SnarkBoojum:
No, that's not needed. But you should really explain in the ticket description which patches should be applied/which scripts should be run. From the previous ticket description, it was a absolutely totally utterly completely not clear that the script should be run instead of applying any patches. |
This comment has been minimized.
This comment has been minimized.
comment:19
I don't like editing the ticket description because that breaks the flow of comments. And notice that running the shell script fixes a huge percentage of the updirectory includes, but doesn't fix them all : I'll still need to hand-edit the remaining ones afterwards. |
comment:20
Replying to @SnarkBoojum:
So you expect the release manager to read all the comments in every ticket just to know which patches should be applied? That's not going to happen. And even from reading the comments, it's not that clear that the shell script replaces the usual patch. |
comment:40
Your error message doesn't look at all like it's related to my changes (no error looking like "File not found"), but I'll investigate... |
comment:41
This is what broke:
used to be
|
comment:42
@vbraun: thanks ; it still doesn't look like a missing file, but at least it's a place I can start digging. My plan was the following :
now step 5 is to start from this sage.misc.sageinspect.sage_getargspec(sage.sets.disjoint_set.OP_represent). |
comment:43
Ok, I determined that sage.misc.sageinspect.sage_getargspec(sage.sets.disjoint_set.OP_represent) gets interpreted in sageinspect.py like this:
I interpret those findings as meaning that something with my patches has made sage_getsource(obj) return None, and this then uncovered a nice bug in sageinspect. Does this sound sensible? Should I then file a bug against sageinspect.py? [Of course, I'll now investigate why None gets returned] |
comment:44
Oh, I forgot to make explicit the remark that sage_getsource returning None could be related to a "File not found" problem -- so now it makes sense that the problem can be related to my patches. Something which wasn't that clear. So now I'm looking for a problem, and I believe in it :-P |
comment:45
I now determined how sage_getsource(sage.sets.disjoint_set.OP_represent) gets interpreted in sageinspect.py:
The problems turns into: why does sage_getsourcelines(sage.sets.disjoint_set.OP_represent) return None? Let's follow the trail again:
So now I see two problems there: first, the only file with a name looking like this is sage/groups/perm_gps/partn_ref/data_structures_pyx.pxi, and second, the way the full path is obtained from the filename looks too naive. How can I debug the first problem? |
comment:46
"sage.sets.disjoint_set.OP_represent" is defined in sage/groups/perm_gps/partn_ref/data_structures_pyx.pxi, and indeed at line 125 as I see in the docstring. |
comment:47
On the non-patched sage-5.10.beta5 the filename is "sage/sets/../groups/perm_gps/partn_ref/data_structures_pyx.pxi". |
comment:48
The filename is already wrong in the Cythonized
So there is nothing in this ticket that is responsible for it. |
comment:49
The bug is in Cython |
comment:50
See #14634 for the Cython bug |
Dependencies: #14634 |
Initial patch |
comment:52
Attachment: trac_12728_docbuild_workaround.patch.gz I suggest we just revert the two includes that trigger the Cython bug. |
This comment has been minimized.
This comment has been minimized.
Changed dependencies from #14634 to none |
comment:53
I'm happy with your solution. I rebuilt sagelib adding your patch to my two patches, then built the doc from there : perfect. Positive review! |
Changed reviewer from Volker Braun, Jeroen Demeyer to Volker Braun, Jeroen Demeyer, Julien Puydt |
Merged: sage-5.10.beta5 |
Problem
There are many places in sage's spkg sources where inclusions are made with a filename which looks like ../../../../../whatever (no exageration: up to five levels!).
Solution
Those should be removed, and the right path added to the include line.
The first patch was obtained by running the attached script and the second one by hand-editing the remaining occurrences.
Apply
Component: build
Author: Julien Puydt
Reviewer: Volker Braun, Jeroen Demeyer, Julien Puydt
Merged: sage-5.10.beta5
Issue created by migration from https://trac.sagemath.org/ticket/12728
The text was updated successfully, but these errors were encountered: