Skip to content

netcdf: fix bugs introduced with multiple build systems split#36825

Merged
haampie merged 2 commits intospack:developfrom
alalazo:packages/fix_netcdf_callbacks
Apr 14, 2023
Merged

netcdf: fix bugs introduced with multiple build systems split#36825
haampie merged 2 commits intospack:developfrom
alalazo:packages/fix_netcdf_callbacks

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Apr 13, 2023

fixes #36689

Modifications:

  • The "base" builder class should be last in the MRO
  • filter_compiler_wrappers needs to be moved to builders
  • Decorating a function from a mixin class require using the correct metaclass for the mixin

fixes spack#36689

Modifications:

- [x] The "base" builder class should be last in the MRO
- [x] `filter_compiler_wrappers` needs to be moved to builders
- [x] Decorating a function from a mixin class require using
      the correct metaclass for the mixin
@spackbot-app spackbot-app bot added core PR affects Spack core functionality update-package labels Apr 13, 2023
@spackbot-app spackbot-app bot requested review from WardF and skosukhin April 13, 2023 12:49


class BackupStep:
class BackupStep(metaclass=spack.builder.PhaseCallbacksMeta):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer BackupStep and Setup classes to be merged into one. Possibly, under a generic name like BaseBuilder. But I can do that later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's fine with me. The caveat here is that if a mixin has some @run_after or @run_before decorated method, then it must inherit from the correct metaclass.

@skosukhin
Copy link
Copy Markdown
Member

@adamjstewart I guess we should update proj in a similar way.

@skosukhin
Copy link
Copy Markdown
Member

Works for me. Thanks!

@adamjstewart
Copy link
Copy Markdown
Member

@skosukhin can you open a PR for proj? Don't have time to test but can review.

@haampie haampie merged commit 9ec2898 into spack:develop Apr 14, 2023
@alalazo alalazo deleted the packages/fix_netcdf_callbacks branch April 14, 2023 09:00
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Apr 25, 2023
…36825)

Fixes spack#36689

- The "base" builder class should be last in the MRO
- `filter_compiler_wrappers` needs to be moved to builders
- Decorating a function from a mixin class require using
   the correct metaclass for the mixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality update-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple build systems: second builders do not inherit phase callbacks

4 participants