-
Notifications
You must be signed in to change notification settings - Fork 587
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
Refactor includes (attempt #2, with absolute paths) #78
Refactor includes (attempt #2, with absolute paths) #78
Conversation
This removes the need to add their source roots to our include path and makes includes clearer and less ambiguous.
This reduces ambiguity and lets other projects include libsnark without having it pollute the project's include path.
Looks good to me. |
Although you are correct that automatic merging will fail, Pull requests should usually be rebased before submission anyway to ensure that they are following the latest version of the original source code. I've never seen a symlink in a git repository. A Google search suggests that they work more or less the way we'd expect them to on filesystems other than FAT, but this solution still seems kind of hackish and confusion-inducing to me (e.g., if |
I agree with @popoffka: pull requests should be rebased and adding a symlink would just obscure the changes. With a symllink simple examples will continue to work, but once you've added/removed/modified at least one include the code won't merge anymore. |
OK, then I'm fine with merging this. |
SGTM in general. @popoffka Can you confirm your PR builds as expected in your client? I see the following compilation error (at the referenced commit hash below):
|
@tromer I plan to turn on continuous integration for candidate-master soon, so we won't have to manually check these things in PRs. I'll start an email thread on this. |
@howardwu that's expected — you need to also apply the changes from the corresponding pull request in libff. Sorry I didn't make that clear. |
@popoffka thanks and wonderful work! This should make development easier and IDE integration more fluid. LGTM. Builds and passes tests -
|
This pull request replaces and closes #77.
This pull request:
makes the paths in all local includes (i.e. those including files from within libsnark) directory-qualified (see pull request 8 in libff for justification)
converts all libff/libfqfft includes from local to system-style (e.g.
#include "common/utils.hpp"
→#include <libff/common/utils.hpp>
) to make it explicit and unambiguous when files from an external library are being included.This pull request (as well as the accompanying ones in libff and libfqfft) was largely generated using a Python script.