boost: do not add the context-impl option for version below 1.65.0#30719
boost: do not add the context-impl option for version below 1.65.0#30719tldahlgren merged 3 commits intospack:developfrom
Conversation
|
Good catch! I really wish I had better CI for this package. This will be fixed in #30627, but we should merge this as a stop-gap. |
c5beddb to
f466cbb
Compare
|
|
||
| # If we are building context, tell b2 which backend to use | ||
| if '+context' in spec: | ||
| if '+context' in spec and spec.version >= Version('1.65.0'): |
There was a problem hiding this comment.
Based on how versions are checked pretty much everywhere else in the package, I recommend using spec.satisfies() syntax for these changes for consistency. See line 151 for example.
There was a problem hiding this comment.
Actually, would this be better or simpler implemented as a conflict?
There was a problem hiding this comment.
As far as I can tell, the problem is not +context but context-impl which are tied together.
Making the addition of context a conflict would also break the coroutine variant. See line 221 and 222.
Would the use of spec.satisfies() then look like the following?
if '+context' in spec and spec.satisfies('@1.65.0:'):There was a problem hiding this comment.
Sorry for the late reply.
The latest change makes the fix agnostic of the boost version by simply checking if the spec.variants dict contains context-impl.
In summary:
- The
context-implvariant is disabled if for boost versions < 1.65.0 - The content of the
context-implvariant is only read if it is contained withinspec.variants
|
This PR does fix the problem, but we're silently hiding the issue. I agree with @tldahlgren, this should be made an explicit conflict. |
@mzeyen1985 Did you want to add an explicit conflict to this PR? |
f466cbb to
96f8f9a
Compare
…onflict Executing spack solve [email protected] +context context-impl=fcontext triggers the following error message: ==> Error: No version for 'boost' satisfies '@1.63.0' and '@1.79.0' With this change, the error message becomes the following: ==> Error: Cannot set variant 'context-impl' for package 'boost' because the variant condition cannot be satisfied for the given spec
cba17ad adds an explicit conflict for the Adding a conflict for |
|
@hainest @mzeyen1985 Is this PR ready to merge? |
|
@tldahlgren @mzeyen1985 This mostly solves the issue. I think the uncaught cases will be fixed by #30627. For example, it catches but not I think the reason here is that the concretizer is skipping the |
…pack#30719) * boost: do not access the context-impl variant for versions below 1.65.0 * boost: check if spec.variants contains context-impl * boost: improve error message when the context-impl variant causes a conflict Executing spack solve [email protected] +context context-impl=fcontext triggers the following error message: ==> Error: No version for 'boost' satisfies '@1.63.0' and '@1.79.0' With this change, the error message becomes the following: ==> Error: Cannot set variant 'context-impl' for package 'boost' because the variant condition cannot be satisfied for the given spec
#30654 doesn't prevent the addition of the b2 option
context-implwhen the variant is disabled.This PR adds a version check to the corresponding if condition.