CDash build error: JSON not found

Hi Slicers,

I have uploaded some projects to the Slicer Extension Index. Some of them presented the following build error:

error: EXTENSION_FILE CMake variable points to a inexistent file or
  directory: /.../SlicerDTIALPS-build/./Slicer-DTI-ALPS.json
Call Stack (most recent call first):
  /work/Preview/Slicer-0/Extensions/CMake/SlicerExtensionPackageAndUploadTarget.cmake:206 (slicerFunctionExtractExtensionDescriptionFromJson)

This example was for the extension: Slicer-DTI-ALPS
Link for the .json file in the SlicerExtensionIndex: ExtensionsIndex/SlicerDTIALPS.json at main · Slicer/ExtensionsIndex · GitHub

However, a problem occurred to me before uploading this .json file. In fact, the building process (I followed the steps in the Slicer documentation) did not create a .json file but the old .s4ext text file.

I manually created the .json file to upload to the Slicer Extension Index.

How can I update the build folder to automatically generate the .json file? I believe that is the problem to CDash build error…

Note: A strange thing happens to another Slicer Extension (Brain Volume Refinement) that does all the building process normally, but it has the same building instructions (as far as I know). Hence, the .json file was not the problem here… :thinking:

Thank you in advance for the assistance!

As an additional test, I made a brand new Slicer Extension (using the Extension Wizard module) to verify whether the Slicer 5.x version had updated the Extension creation from the previous Slicer 4.x extension pattern (which is the most cases for my previous Slicer extensions codes).

However, after the build had been done (as given at Extensions — 3D Slicer documentation), the exported file is still a .s4ext text file, and I did not found a .json instead.

@lassoan @pieper @jamesobutler can someone give some help here, please?

Good point, we missed this. Would you give it a try and update the exrension description generation in Slicer to create a json file instead?

Hi @lassoan

I was trying to understand the Extension Description file writing process through the Slicer code, but I confess that it was a bit confusing to me…

I have compared the git tag 5.6 (which is the stable version at the moment) to the main code, however the ExtensionDescription.py script is already updated to json in the most recent commit.
See the line of code (comparing the tag 5.6 and main)

What is a possible adjustment in this case? In my understanding, the Slicer stable version (5.6 and below) has the old .s4ext format as default. Then, after commit 437e338 the new json file structure is introduced, which is the case for the slicer preview building process.

How can I give a different building procedure on each slicer preview and slicer stable stages?

I am sorry for the long explanation, but I am puzzled about how to help here…

@lassoan , I think that I narrowed the point to adjustment…

After I rebuilt the Slicer version to nightly, using the main branch, I noticed that the Slicer/Utilities/Scripts/SlicerWizard/ExtensionDescription.py file is already updated to json description file formatting.
However, the extension building process continues to generate the old .s4ext file instead. I used the common cmake building command as described in the Slicer documentation.

Then I started to check it out the CMake files to find where it has the mention to s4ext and located the SlicerExtensionCPack.cmake, line 79

I think that this maintains the same s4ext extension description, even with the json being delegated to the ExtensionDescription.py.

Unfortunately, my knowledge of CMake does not allow me to fix this, but I hope I assisted you in checking where it could be fixed in the Slicer code.

Is this correct? Can I help is something else?