lanl / lanl/singularity-eos

Switch asserts to runtime errors in constructors

Open
#345 3 comments 0 reactions 1 assignee View on GitHub

@jhp-lanl is already working on this.

Since Feb 14, 2024.

bug enhancement Robustness
Dominant language
C++
Stars
39
Forks
22
Avg merge
10h 22m
Merged PRs (30d)
3

Description

Our spack host codes don't always propagate the build type to their spack dependencies. As a result, telling the host code to build with debug won't link to a debug version of singularity-eos. Host codes also don't want to propagate the build type either for performance reasons or to minimize the size of the spack buildout.

However, this makes our assert statements almost completely useless since it's probably rare that somebody will manually change the spack spec to build singularity in debug mode.

I would propose that all constructors should use the ports-of-call portable error machinery instead and ensure that errors are raised even outside debug builds. Checks at lookup time can still use asserts since we want those to be performant, but there's no reason to sacrifice debugging for performance during initialization.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.