Skip to content

Tracking: ITK_FUTURE_LEGACY_REMOVE / ITK_LEGACY_REMOVE build broken across opt-in (ingested remote) modules #6509

Description

@hjmjohnson

Tracking issue for the ITK_FUTURE_LEGACY_REMOVE / ITK_LEGACY_REMOVE build fixes across the opt-in (ingested remote) modules. The Mac10.15-AppleClang-dbg nightly (CDash build 11368783) configures with ITK_FUTURE_LEGACY_REMOVE and failed to compile; investigating it surfaced that the deprecation-removal configurations are broken across many modules that no CI job exercises.

PRs (merge checklist)

Follow-ups (not yet opened)

  • Add an all-in-tree-modules ITK_FUTURE_LEGACY_REMOVE/ITK_LEGACY_REMOVE CI gate (extend the Mac10.15-AppleClang-dbg nightly to ITK_BUILD_ALL_MODULES) so this class of breakage is caught at PR time. Unblocked once the PRs above merge.
  • Retire FEM LinearSystemWrapperItpack (dsrc2c.c, ~8k lines of f2c) for an Eigen-backed wrapper, then drop the co-located tqlrat.
  • COMP: Remove non-functional CCACHE_BASEDIR setting from ITK_USE_CCACHE #6510 — Fix CMake/itkCCacheSupport.cmake: bake CCACHE_BASEDIR into the compiler launcher (the set(ENV{...}) was a configure-time no-op) so cross-build-tree cache reuse works

CI coverage gap. The only nightly that enables ITK_FUTURE_LEGACY_REMOVE (Mac10.15-AppleClang-dbg) builds only the default module set. The modules above are opt-in (ingested remote modules, EXCLUDE_FROM_DEFAULT), so they are exercised by no CI job under the legacy-removal flags — and the ITK_LEGACY_REMOVE-only configuration is not exercised at all. That is why this breakage accumulated undetected until the QR deprecation tripped the one default-module gate.

Root cause & mechanism

The deprecation guards are hard compile-time errors:

  • ITK_FUTURE_LEGACY_REMOVE: itkTypeMacro / itkGetStaticConstMacro / itkStaticConstMacro become static_assert/string-literal errors (itkMacro.h); vnl/algo/vnl_qr.h and VNLSparseLUSolverTraits.h #error; vnl_*_eigensystem and the netlib eispack are dropped; ImageRegionIterator/ImageScanlineIterator::GetIndex() and the CoordRepType aliases are removed.
  • ITK_LEGACY_REMOVE: ITK_NOEXCEPT is removed.

Because a #error/static_assert only fires when a translation unit that includes it is actually compiled, and these modules are never compiled under the legacy flags in CI, the breakage was invisible. The fixes are mechanical, behavior-preserving modernizations to the replacement APIs the deprecation messages point to (itkOverrideGetNameOfClassMacro, Self::name, static constexpr, ImageRegionIteratorWithIndex, CoordinateType, noexcept, itk::QRDecomposition).

Verification

Each PR was built under baseline, ITK_LEGACY_REMOVE=ON, and ITK_LEGACY_REMOVE=ON + ITK_FUTURE_LEGACY_REMOVE=ON, with the module's tests run in baseline (no behavior change). The IsotropicWavelets ShrinkDecimate/ExpandWithZeros scanline→ImageRegionIteratorWithIndex refactor and the FEM/LandmarkBased vnl_qritk::QRDecomposition migrations were additionally verified for numerical equivalence.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions