View Issue Details

IDProjectCategoryView StatusLast Update
0003737Slicer4Core: Extensionspublic2014-09-17 23:01
ReporterfbudinAssigned Tomatthew-woehlke 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003737: Error when trying to update an extension using SVN with slicerExtensionWizard
Description

When trying to update my extension using the slicerExtensionWizard, I get the following error message:

extension repository not found

However, if I check what is in my repository, a ".svn" is there.

The command line I tried to commit my code was:
./slicerExtensionWizard --contribute /opt/Francois/temp/NAMICJANSLC2014/ExtensionsIndex-build-Slicer4.3.1-r22599/SPHARM-PDM

TagsNo tags attached.

Relationships

related to 0003740 acknowledgedjcfr ExtensionWizard - Add a check for SVN version 

Activities

matthew-woehlke

matthew-woehlke

2014-06-13 13:10

developer   ~0012063

To verify: /opt/Francois/temp/NAMICJANSLC2014/ExtensionsIndex-build-Slicer4.3.1-r22599/SPHARM-PDM/.svn exists? If you run 'svn info' in the directory you passed to the wizard (i.e. the above without the '/.svn'), what output do you get?

fbudin

fbudin

2014-06-13 13:12

developer   ~0012064

.svn exists. I have just updated the directory. Here is the output:
svn info
Path: .
URL: https://www.nitrc.org/svn/spharm-pdm
Repository Root: https://www.nitrc.org/svn/spharm-pdm
Repository UUID: 026a22ec-4e7a-0410-994d-e47a0e92e701
Revision: 227
Node Kind: directory
Schedule: normal
Last Changed Author: bpaniagua
Last Changed Rev: 227
Last Changed Date: 2014-06-13 14:49:05 -0400 (Fri, 13 Jun 2014)

matthew-woehlke

matthew-woehlke

2014-06-13 14:10

developer   ~0012066

Um... You seem to be missing the working copy path. What version of svn are you using? I believe that was added in 1.7.

Here's an example of what I get:

Path: .
Working Copy Root Path: /usr/local/src/matthew/work-slicer/fvlight
URL: https://www.nitrc.org/svn/fvlight/trunk
Relative URL: ^/trunk
Repository Root: https://www.nitrc.org/svn/fvlight
Repository UUID: 191cb628-64b0-0410-bf67-95dbc4b3c780
Revision: 76
Node Kind: directory
Schedule: normal
Last Changed Author: fbudin
Last Changed Rev: 76
Last Changed Date: 2014-05-23 13:25:06 -0400 (Fri, 23 May 2014)

fbudin

fbudin

2014-06-14 08:02

developer   ~0012069

Indeed, I am using svn version 1.6.11 (r934486).
I will try with a newer version.

fbudin

fbudin

2014-06-16 06:30

developer   ~0012072

Using a virtual machine with Ubuntu 14.04 and svn 1.8.8, I now get the following message:
~/test$ Slicer-4.3.1-2014-06-13-linux-amd64/bin/slicerExtensionWizard --contribute spharm-pdm/
failed to register extension: "script does not set 'EXTENSION_HOMEPAGE'"

jcfr

jcfr

2014-06-16 06:56

administrator   ~0012073

This is explained because, the extension metadata are not specified in your top level CMakeLists.txt [1]

You have then two options:

1) Set the extension metadata in your top level CMakeLists
2) Manually contribute your extension

@Matt: What do you think ?

[1] https://www.nitrc.org/svn/fvlight/trunk/CMakeLists.txt

fbudin

fbudin

2014-06-16 07:02

developer   ~0012074

Last edited: 2014-06-16 07:07

Indeed, in most (if not all) my projects, I specify the extension variables in Common.cmake which is included both in my Superbuild and in the sub-project cmake file.
CMakeLists.txt->includes SuperBuild.cmake->includes Common.cmake
CMakeLists.txt->includes SPHARM-PDM.cmake->includes Common.cmake

Should I directly include all the extension variables in CMakeLists.txt? It is not an issue if I need to since I just need to move a few lines of CMake code.

jcfr

jcfr

2014-06-16 07:16

administrator   ~0012075

If possible, it would make your extension more "standard" and allow the wizard to work.

That said, if you have any advice on how we could also improve the Superbuild extension template [1], that would be great.

[1] https://github.com/Slicer/Slicer/tree/master/Utilities/Templates/Extensions/SuperBuild

fbudin

fbudin

2014-06-16 07:47

developer   ~0012076

I modified my CMake code:
http://www.nitrc.org/plugins/scmsvn/viewcvs.php?view=rev&root=spharm-pdm&revision=228

However, I still had 2 issues:
-My project name was used to create the branch name and the new extension description file name, and that name was wrong (i.e. it contained a CMake variable).
-The extension description file needs to contain an svn username and an svn password. When the new description file is created, it does not contain this information.

This new way of contributing code seems great, but not quite adapted to my purpose. I will commit the new code using the manual way.
Thank you!

jcfr

jcfr

2014-06-16 07:58

administrator   ~0012077

Last edited: 2014-06-16 07:59

1) For svn username / password ... I will extend the system so that you could directly specify EXTENSION_SVNUSERNAME and EXTENSION_SVNPASSWORD in your CMakeLists.

2) Example of invalid branch name is here: https://github.com/Slicer/ExtensionsIndex/pull/688

fbudin

fbudin

2014-06-16 08:16

developer   ~0012078

1) That would indeed be great
2) The branch name was wrong because:
-It contains a CMake variable which was not replaced by its value
-The name of the project contain the word "Superbuild" because the project is currently named like this if built as Superbuild or as an extension

  • The exact name of the branch was "SuperBuild_${LOCAL_PROJECT_NAME}-master"

I could correct [2] by adapting the name of the project in the CMakeLists.txt file.
Thank you.

matthew-woehlke

matthew-woehlke

2014-06-16 09:45

developer   ~0012079

EXTENSION_SVNUSERNAME and EXTENSION_SVNPASSWORD should already be recognized. (You do need to add them to your CMakeLists.txt, though.)

For (2), what does your CMakeLists.txt look like?

If it could reasonably look like:

if(NOT SUPERBUILD)
project(MyProjectName)
else()
project(SuperBuild_${LOCAL_PROJECT_NAME}-master)
endif()

That might work better. (The first project() call is used. The parser is meant to work without a build directory required, so it is rather simple-minded - basically a glorified regex matcher - as a result.)

fbudin

fbudin

2014-06-16 09:55

developer   ~0012080

Thanks for the clarification. My project is built with Superbuild set to ON even in the case of an extension, so I would have to modify my CMakeLists a little more than that, but that would still be possible to match the expected structure.

jcfr

jcfr

2014-06-17 05:42

administrator   ~0012081

What about changing:

// -----------------------------
option(${LOCAL_PROJECT_NAME}_SUPERBUILD "Build ${LOCAL_PROJECT_NAME} and the projects it depends on via SuperBuild.cmake." ON)
mark_as_advanced(${LOCAL_PROJECT_NAME}_SUPERBUILD)

[...]

if(${LOCAL_PROJECT_NAME}SUPERBUILD)
project(SuperBuild
${LOCAL_PROJECT_NAME})
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
else()
project(${LOCAL_PROJECT_NAME})
include("${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_PROJECT_NAME}.cmake")
return()
endif()
// -----------------------------

into something like

// -----------------------------
project(SPHARM-PDM)

[...]

option(${PROJECT_NAME}_SUPERBUILD "Build ${PROJECT_NAME} and the projects it depends on via SuperBuild.cmake." ON)
mark_as_advanced(${PROJECT_NAME}_SUPERBUILD)

[...]

if(${PROJECT_NAME}_SUPERBUILD)
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
else()
include("${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.cmake")
return()
endif()
// -----------------------------

jcfr

jcfr

2014-06-17 05:53

administrator   ~0012082

Last edited: 2014-06-21 23:29

Closing this issue.

It turns out that:
(1) upgrading SVN to version > 1.7
(2) restructuring the CMakeLists.txt of the project

was sufficient.

@Francois: In Slicer, I was thinking to change the SVN minimum required version. Would that be an issue ?

@Matt: I added an entry into the ExtensionWizard wiki page mentioning that SVN >= 1.7 was required. See http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/ExtensionWizard#Requirements

Also created issue 0003740 to add version checking to the wizard

jcfr

jcfr

2014-09-17 23:01

administrator   ~0012528

Closing resolved issues that have not been updated in more than 3 months.

Issue History

Date Modified Username Field Change
2014-06-13 12:33 fbudin New Issue
2014-06-13 12:33 fbudin Status new => assigned
2014-06-13 12:33 fbudin Assigned To => jcfr
2014-06-13 12:58 jcfr Assigned To jcfr => matthew-woehlke
2014-06-13 12:58 jcfr Target Version => Slicer 4.4.0
2014-06-13 13:10 matthew-woehlke Note Added: 0012063
2014-06-13 13:10 matthew-woehlke Status assigned => feedback
2014-06-13 13:12 fbudin Note Added: 0012064
2014-06-13 14:10 matthew-woehlke Note Added: 0012066
2014-06-14 08:02 fbudin Note Added: 0012069
2014-06-16 06:30 fbudin Note Added: 0012072
2014-06-16 06:56 jcfr Note Added: 0012073
2014-06-16 07:02 fbudin Note Added: 0012074
2014-06-16 07:07 fbudin Note Edited: 0012074
2014-06-16 07:07 fbudin Note Edited: 0012074
2014-06-16 07:07 fbudin Note Edited: 0012074
2014-06-16 07:16 jcfr Note Added: 0012075
2014-06-16 07:47 fbudin Note Added: 0012076
2014-06-16 07:58 jcfr Note Added: 0012077
2014-06-16 07:59 jcfr Note Edited: 0012077
2014-06-16 08:16 fbudin Note Added: 0012078
2014-06-16 09:45 matthew-woehlke Note Added: 0012079
2014-06-16 09:55 fbudin Note Added: 0012080
2014-06-17 05:42 jcfr Note Added: 0012081
2014-06-17 05:52 jcfr Relationship added related to 0003740
2014-06-17 05:53 jcfr Note Added: 0012082
2014-06-17 05:53 jcfr Status feedback => resolved
2014-06-17 05:53 jcfr Fixed in Version => Slicer 4.4.0
2014-06-17 05:53 jcfr Resolution open => no change required
2014-06-21 23:29 jcfr Note Edited: 0012082
2014-09-17 22:59 jcfr Status resolved => closed
2014-09-17 23:01 jcfr Note Added: 0012528