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

generated code position comments should use relative file paths #1194

Closed
robertwb opened this issue Dec 29, 2010 · 2 comments
Closed

generated code position comments should use relative file paths #1194

robertwb opened this issue Dec 29, 2010 · 2 comments

Comments

@robertwb
Copy link
Contributor

Currently, Cython generates absolute file paths into the source code position comments, e.g.

/* "/[...]/cython/cython-devel/Cython/Compiler/Code.pxd":62
 * 
 *     @cython.locals(intern=bint, is_str=bint, is_unicode=bint)
 *     cpdef get_py_string_const(self, encoding, identifier=*, is_str=*)             # <<<<<<<<<<<<<<
 * 
 * ## cdef class PyStringConst:
 */

It would be better to use file paths relative to the project root, or even the package root of the project (thus printing basically the module's package path only).

This would reduce the size of the generated file, avoid leaking information about the file system layout of the author and (to a certain extent) better support diffs when comparing generated C files from different project checkouts (e.g. different Cython versions).

Migrated from http://trac.cython.org/ticket/635

@robertwb
Copy link
Contributor Author

scoder changed owner from somebody to scoder
status from new to assigned
commented

@robertwb
Copy link
Contributor Author

scoder changed milestone from wishlist to 0.14.1
resolution to fixed
status from assigned to closed
commented

Fix is here:

c6be9c5

ed53fdd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant