Skip to content

BUG: Fix superclass name in itkTypeMacro#3062

Merged
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixTypeMacroSuperClassName
Jan 10, 2022
Merged

BUG: Fix superclass name in itkTypeMacro#3062
dzenanz merged 2 commits intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixTypeMacroSuperClassName

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

@jhlegarreta jhlegarreta commented Jan 8, 2022

  • BUG: Fix superclass name in itkTypeMacro
  • BUG: Use the superclass name in itkTypeMacro

PR Checklist

@github-actions github-actions Bot added area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Jan 8, 2022
@jhlegarreta jhlegarreta force-pushed the FixTypeMacroSuperClassName branch 2 times, most recently from e2b0ea3 to 57686ff Compare January 8, 2022 14:01
Fix superclass name in `itkTypeMacro`.
@jhlegarreta jhlegarreta force-pushed the FixTypeMacroSuperClassName branch from 57686ff to 6ea0640 Compare January 8, 2022 23:16
Use the superclass name instead of the `Superclass` alias in
`itkTypeMacro`.
@jhlegarreta jhlegarreta force-pushed the FixTypeMacroSuperClassName branch from 6ea0640 to 0ee4882 Compare January 9, 2022 01:54
using OctreeType = itk::Octree<unsigned int, 16384, IdentityMap<unsigned int, 16384>>;
auto octree = OctreeType::New();

// ITK_EXERCISE_BASIC_OBJECT_METHODS(octree, Octree, OctreeBase);
Copy link
Copy Markdown
Member Author

@jhlegarreta jhlegarreta Jan 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have commented this. It seems to upset Windows because the test is telling that the superclass name is Object:
https://dev.azure.com/itkrobotwindow/ITK.Windows/_build/results?buildId=7506&view=logs&j=2d2b3007-3c5c-5840-9bb0-2b1ea49925f3&t=77aad734-2057-5694-9ae2-ee1f5f26eae8&l=55016

which should not to be the case; Object is the superclass of OctreeBase.

Both Linux and macOS seemed to be happy for the very same commit 9ed699b:
https://dev.azure.com/itkrobotlinux/ITK.Linux/_build/results?buildId=7524&view=results
https://dev.azure.com/itkrobotmacos/ITK.macOS/_build/results?buildId=7455&view=results

I do not see anything wrong, and it reminds me of other past cases that are yet to be solved (they were commented as they could not be solved after some investigation), e.g. #2286 (comment)

So I preferred to comment the statement here as well, as it seems to deserve a separate investigation.

Might be loosely linked to #3008, although the latter was mainly opened due to the FFT backend name of class and GCC issues.

Copy link
Copy Markdown
Member Author

@jhlegarreta jhlegarreta Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another one I found yesterday is itk::StdStreamLogOutput, whose parent class is itk::LogOutput; when trying to exercise basic object methods ITK_EXERCISE_BASIC_OBJECT_METHODS, it expects itk::Object as the superclass, which is itk::LogOutput's parent. Not sure if all these are somehow related to symbol exportation macros, i.e. ITKCommon_EXPORT. Just guessing.

@dzenanz dzenanz merged commit 8e1220c into InsightSoftwareConsortium:master Jan 10, 2022
@jhlegarreta jhlegarreta deleted the FixTypeMacroSuperClassName branch January 10, 2022 15:50
@jhlegarreta
Copy link
Copy Markdown
Member Author

For the records, after testing, the changes in 0ee4882 did not belong to the BUG category, but were STYLE changes instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants