Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling build_option too early causes a mess #2115

Open
boegel opened this issue Feb 10, 2017 · 0 comments
Open

calling build_option too early causes a mess #2115

boegel opened this issue Feb 10, 2017 · 0 comments
Milestone

Comments

@boegel
Copy link
Member

boegel commented Feb 10, 2017

While working on #2110 with @victorusu, we bumped into a hard-to-debug mess by introducing a call to build_option('extended_dry_run') in the symlink function provided by filetools (which got rolled back).

Because symlink is by the handling of the --include-* options, which is done before option parsing fully completes, the BuildOption singleton is being created too early, i.e. before the build options are actually available. In later calls to build_option, the basically empty instance of BuildOption is reused, leading to errors like:

Traceback (most recent call last):
  File "/tmp/200339473/lib/python2.6/site-packages/easybuild_framework-3.1.0-py2.6.egg/test/framework/options.py", line 2090, in test_use_included_module_naming_scheme
    self.eb_main(args, logfile=dummylogfn, do_build=True, raise_error=True, raise_systemexit=True, verbose=True)
  File "/tmp/200339473/lib/python2.6/site-packages/easybuild_framework-3.1.0-py2.6.egg/test/framework/utilities.py", line 293, in eb_main
    raise myerr
EasyBuildError: 'Undefined build option: from_pr'

Potential solutions:

  • refactor to avoid that BuildOptions is a singleton;
  • avoid taking any actions before completing the option parsing; as it is now, some options like --include-*, --list-* and --avail-* are handled in options.py itself, rather than only parsing the options and letting main.py take care of the handling of the options...
@boegel boegel added this to the 3.2.0 milestone Feb 10, 2017
@boegel boegel modified the milestones: 3.2.0, 3.3.0 May 2, 2017
@boegel boegel modified the milestones: 3.3.0, 3.x Jun 22, 2017
@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant