symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.44k stars 147 forks source link

Using symforce as submodule, fixing rerun_if_needed.py #382

Closed chengguizi closed 8 months ago

chengguizi commented 9 months ago

This line would break, if the symforce is a submodule of a parent project.

https://github.com/symforce-org/symforce/blob/5c0ed32871f5d1be9621f59ffbe57ccf4c7756be/cmake/rerun_if_needed.py#L138

Proposed fix:

repo_root = get_output(["git", "rev-parse", "--show-toplevel"], cwd=path_to_check)
aaron-skydio commented 8 months ago

Thanks, yeah this makes sense to me - if you want to submit a PR so you get credit go ahead, otherwise one of us can do it

chengguizi commented 8 months ago

Tried to create on PR. Hope everything is good!