solver: do a precheck for non-existing and deprecated versions#51555
solver: do a precheck for non-existing and deprecated versions#51555
Conversation
|
I think this will be popular. Don't merge this before @alalazo or @becker33 have a chance to review -- I am not certain this i handling all ways a version can be possible/impossible. It can also probably be quicker (i.e. we could do some of these checks before setup) but I went for something simple and conservative for now, since setup determines all possible versions. One thought: we used to allow people to Thoughts? |
789af31 to
af25514
Compare
becker33
left a comment
There was a problem hiding this comment.
Perfectly reasonable if it's not in scope for this PR but it would be great to do this for requirements as well.
Along this vein, perhaps we should extract this into two methods? I was just chatting with @vbrunini about doing the same thing for the intersection of externals and requirements due to added sensitivity of specifying externals post #51118. I'm not sure if that would be better to do presolve or via an error message in the solve ATM. |
|
I tried a few things here with various versions of First, with a version that doesn't exist, the old message doesn't I get the same error with With the patch, I get this which is more helpful. If I specify the version in This is the same error as with develop. I assume this occurs after Btw, I understand why the concretizer throws away deprecated versions I was maybe a little disappointed with Here, Anway, I think it's a fine sanity check that should catch a lot of common error cases. Probably there will be opportunities for other sanity checks that are |
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
a8cf386 to
b4ae4f3
Compare
due to zig error Signed-off-by: Gregory Becker <[email protected]>
824e63b to
690fd55
Compare
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
This reverts commit 690fd55. Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Greg Becker <[email protected]>
Signed-off-by: Todd Gamblin <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
…#51555) * solver: do a precheck for non-existing and deprecated versions The solver can report errors for versions that do not exist, but it's easier and often faster to check for these beforehand. Also the solver doesn't know about deprecated versions, so we can generate a much clearer error message with a pre-pass. - [x] Create a method `impossible_dependencies_check`, that checks input specs for non-conditional impossible dependencies - [x] Create a method, `input_spec_version_check`, that checks input specs for versions that we know statically to make the solve unsat. - [x] Error if any version in an input spec is: 1. Unknown (not in any package definition and not possible via setup), or 2. Deprecated (i.e. it can only be satisfied by deprecated versions), and advise the user ot use `--deprecated` if so. Signed-off-by: Todd Gamblin <[email protected]> Signed-off-by: Gregory Becker <[email protected]> Co-authored-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
* solver: do a precheck for non-existing and deprecated versions
The solver can report errors for versions that do not exist, but it's easier
and often faster to check for these beforehand. Also the solver doesn't know
about deprecated versions, so we can generate a much clearer error message with
a pre-pass.
- [x] Create a method `impossible_dependencies_check`, that checks input specs
for non-conditional impossible dependencies
- [x] Create a method, `input_spec_version_check`, that checks input specs for
versions that we know statically to make the solve unsat.
- [x] Error if any version in an input spec is:
1. Unknown (not in any package definition and not possible via setup), or
2. Deprecated (i.e. it can only be satisfied by deprecated versions),
and advise the user ot use `--deprecated` if so.
Signed-off-by: Todd Gamblin <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Co-authored-by: Gregory Becker <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
|
This PR does not apply cleanly to releases/v1.0 and will be dropped from v1.0.3 |
The solver can report errors for versions that do not exist, but it's easier and often faster to check for these beforehand. Also the solver doesn't know about deprecated versions, so we can generate a much clearer error message with a pre-pass.
input_spec_version_check, that checks input specs for versions that we know statically to make the solve unsat.--deprecatedif so.