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
Add link to C file in Cython failures and -a for annotated html #1976
Comments
That should be pretty easy, just by putting the compiled file and generated html inside the notebook-dir, since everything there is already available. |
Yes, I think it's very straightforward. I was tempted to do it just now but I'm in the middle of other stuff, so I decided to at least record it here... |
Unfortunately this is a not a completely straightforward task as our call to Since our |
@bfroehle, what about setting the global Cython flag as I indicated above? I took that tip from a thread on the cython list just a few days ago, so I assumed it would work fine... |
I just closed #2143 as a duplicate. There is a small bit of code in the issue which may be useful. |
There's an implementation in #PR2147 that works for me on win32. Whilst it seems to work perfectly in the Notebook, in the QtConsole the underlying c code which is usually collapsed is visible. Having done this I now understand the point Fernando was making in his initial comment. |
It appears that the It appears that unconditionally re-cythonizing leads to a link error due to a permission error on the I'm a bit stumped there - I haven't been able to get it to work correctly other than the code which is in my pull-request. |
Yes, sometimes cython will sucessfully emit C code that then gcc can't compile. Having a link to the auto-generated C file is very useful, since often looking directly at the raw (and hyper-ugly) C is the only way to figure out what went wrong. Since these filenames look random to the human eye, manually rooting through your cache is kind of annoying, and a direct clickable link would help a lot. I've had to do this very kind of manual debugging in the past, whence my opening of this issue. I'm pretty sure sage does give a link to the C file for this very reason. |
Any progress or thoughts on putting the C file somewhere accessible, and/or printing its location? |
In the cython magic extension, it would be nice to return a link to the generated C file that can be opened in the browser as well as supporting the
-a
flag to produce annotated HTML. The annotation flag can be activated by settingThese two simple enhancements would make debugging and optimization of Cython code much more user friendly.
The text was updated successfully, but these errors were encountered: