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

A faulty patch causes long rebuild times #355

Open
keszegrobert opened this issue Nov 19, 2024 · 0 comments
Open

A faulty patch causes long rebuild times #355

keszegrobert opened this issue Nov 19, 2024 · 0 comments
Assignees

Comments

@keszegrobert
Copy link
Contributor

There is a huge amount of commands listed here one add_custom_target

add_custom_target(

Even if one of the command fails (it does), it must rerun all the rules in the generated rules file.
ChatGPT recommended me to do the commands separately:

add_custom_command(
    OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/humanoid/humanoid.xml"
    COMMAND ${CMAKE_COMMAND} -E copy
            "${dm_control_SOURCE_DIR}/dm_control/suite/humanoid.xml"
            "${CMAKE_CURRENT_BINARY_DIR}/humanoid/humanoid.xml"
    DEPENDS "${dm_control_SOURCE_DIR}/dm_control/suite/humanoid.xml"
    COMMENT "Copying humanoid.xml for humanoid model"
)

then link the output xml as a dependency:

add_custom_target(copy_model_resources ALL
    DEPENDS
        "${CMAKE_CURRENT_BINARY_DIR}/humanoid/humanoid.xml"
        ...
)

The root cause of the issue is that patching of common_assets/reorientation_cube.xml fails due to a missing EOLN at column 26 here

mjpc/tasks/cube.xml.patch--- common_assets/reorientation_cube.xml 2024-02-11 18:42:07

The patch tool returns an error code and writes this in the output:
missing header for unified diff at line 3 of patch

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

No branches or pull requests

2 participants