-
Notifications
You must be signed in to change notification settings - Fork 20
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
[ICON] add variant extra-configure-args #896
Conversation
|
launch jenkins icon |
tsa🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
balfrin🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
daint🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
launch jenkins icon |
tsa🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
balfrin🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
daint🟢 unit test
🔴 integration test
WARNING: Serial tests did not run for system tests |
launch jenkins icon |
tsa🟢 unit test
|
In my opinion this new variant has several design problems that need to be addressed.
|
balfrin🟢 unit test
🟢 integration test
🟢 system test
|
Good points. Problem 2-5 could be prevented by only allowing values of extra-config-args to be non-variant values. I think we can do only little about 1. Also I think we have to loosen a bit here in order to not releasing a new tag of spack-c2sm for each "pure" configure-arg. With "pure" I refer to option that do not need any additional dependencies etc. |
Something like: class Icon(AutotoolsPackage, CudaPackage):
# ... (existing code)
variant('extra_configure_arg',
default=[],
description='Additional configure arguments')
def validate_extra_configure_arg(self):
for extra_arg in self.spec.variants['extra_configure_arg'].value:
if extra_arg.startswith(('--enable-', '--disable-')) and \
extra_arg[len('--enable-'):].split('=')[0] in self.variants:
raise error.SpecError(f'The value "{extra_arg}" for the extra_configure_arg variant conflicts '
f'with an existing variant. Choose a different value.')
def configure_args(self):
# Validate extra_configure_arg
self.validate_extra_configure_arg() |
This doesn't fix the redundancy problem of But if a tight coupling is your concern, these variants would make it even looser |
daint🟢 unit test
|
launch jenkins icon |
tsa🟢 unit test
|
balfrin🟢 unit test
🟢 integration test
🟢 system test
|
@dominichofer I see your point, but I think the scenario you sketch is unrealistic. It is a clear need from BuildBot to have a less tight coupling of spack-c2sm, i.e allowing the devs to have more freedom with the build. We discussed this before X-Mas in the spack-meeting and it will make our lives easier. I implemented now an additonal check and warnings that should make user aware if the potential damage this variant can have. |
@jonasjucker Thanks for the reminder, I forgot that we already discussed this. I have no further concerns. |
daint🟢 unit test
|
launch jenkins icon balfrin |
tsa🟢 unit test
|
daint🟢 unit test
|
balfrin🟢 unit test
🟢 integration test
🟢 system test
|
@dominichofer Now the PR is ready for another review. |
launch jenkins icon tsa |
daint🟢 unit test
|
balfrin🟢 unit test
|
tsa🟢 unit test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Multi-value variant to inject any configure-argument not yet available as variant.
Ensure that format is either "--enable-arg" or "--disable-arg".
Solves #890