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

DEVEL_MODE is ignored in NON_INTERACTIVE_BUILD for packages that have an hyphen in the name #225

Closed
diegoferigo opened this issue Feb 6, 2018 · 11 comments

Comments

@diegoferigo
Copy link
Member

If I follow the steps:

  • Configure the superbuild as NON_INTERACTIVE_BUILD
  • make update_all
  • Manually checkout devel in some repos
  • Reconfigure CMake setting these repos in DEVEL_MODE
  • Building the superbuild

I obtain the following error:

From https://github.com/robotology/codyco-modules
 * branch              master     -> FETCH_HEAD
First, rewinding head to replay your work on top of it...

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@244ab5948956.(none)')
No rebase in progress?
CMake Error at /iit/sources/robotology-superbuild/build/robotology/codyco-modules/CMakeFiles/YCMTmp/codyco-modules-gitupdate.cmake:95 (message):
  

  Failed to rebase in:
  '/iit/sources/robotology-superbuild/robotology/codyco-modules/'.

  You will have to resolve the conflicts manually

It looks like the superbuild tries to operate on branches anyways.

For the time being, as temporary workaround I set some dummy local git credentials and then I remove them (my system is generic, during its generation does not know any information about the user that is going to use it, for this reason I use a non-interactive build). In this way, the rebase is performed successfully and devel get compiled as expected.

@traversaro
Copy link
Member

If the problem only appears in codyco-modules I imagine it could be related to some weird escaping of the package name.

@diegoferigo
Copy link
Member Author

I reported only the error on codyco-modules, but it is the same for yarp-matlab-bindings as well.

@traversaro
Copy link
Member

yarp-matlab-bindings is another project that have a hyphen () in their package name. I suspect that for some reason the _DEVEL_MODE variable is ignored for project that have an hyphen in their package name.

@traversaro traversaro changed the title Repositories in devel and superbuild in NON_INTERACTIVE_BUILD type DEVEL_MODE is ignored in NON_INTERACTIVE_BUILD for packages that have an hyphen in the name Mar 13, 2019
@traversaro
Copy link
Member

Update the title to capture the latest updates.

@drdanz
Copy link
Member

drdanz commented Mar 14, 2019

Looks like a YCM bug, should we move it to the YCM repo?

@traversaro
Copy link
Member

Ok for me (even if probably it first make sense to try to get the superbuild to work with the latest YCM, so we can verify if this is a problem even in the latest YCM).

@drdanz drdanz transferred this issue from robotology/robotology-superbuild Mar 15, 2019
@drdanz
Copy link
Member

drdanz commented Mar 26, 2019

I think that NON_INTERACTIVE_BUILD and YCM_EP_DEVEL_MODE_XXX should not be used together...

from YCMEPHelper.cmake

  if(NOT NON_INTERACTIVE_BUILD)
    # Non interactive builds should always perform the update step
    set_property(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED 1)
  endif()

NON_INTERACTIVE_BUILD is for CI, and similar, YCM_EP_DEVEL_MODE_XXX is for developers...

@drdanz
Copy link
Member

drdanz commented Mar 26, 2019

by the way, how does this work for repos that don't have a - in the name? I believe it should work in the same way, I couldn't find a problem related to YCM_EP_DEVEL_MODE_XXX

@drdanz
Copy link
Member

drdanz commented Mar 26, 2019

Perhaps it should be a cmake_dependent_option instead of an option, but if you set both from the command line, you won't get any feedback.
Maybe an error is better:

  if(NON_INTERACTIVE_BUILD AND YCM_EP_DEVEL_MODE_${_name})
    message(SEND_ERROR "NON_INTERACTIVE_BUILD AND YCM_EP_DEVEL_MODE_${_name} cannot be used at the same time")
  endif()

@drdanz
Copy link
Member

drdanz commented Mar 27, 2019

Added an error in 287f18d, feel free to reopen this issue if you thing it's not ok.

@diegoferigo
Copy link
Member Author

@drdanz I've missed the notifications of this issue during this past day.

NON_INTERACTIVE_BUILD is for CI, and similar, YCM_EP_DEVEL_MODE_XXX is for developers

I agree, but there are edge cases where developers need it in CI, and this issue (if I recall) reported something similar. In fact, this is the case when CI builds a docker image. You might want to select a different branch for some of the projects contained in a superbuild, and in the same time you don't want to store credentials (even dummy ones as the workaround described above).

Though, robotology-superbuild#100 introduced an alternative way to check out branches that plays really well with this edge use case. Due to this reason, I think that specifically for what I reported we can consider the problem solved. However I would not consider the two options as mutually exclusive.

I do not really remember if the presence of the hypen in the name was just an hypothesis, we didn't dig more into this. Considering the clues, it was a possible explanation, but it was not really grounded.

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

3 participants