-
Notifications
You must be signed in to change notification settings - Fork 5
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
Possible solver contains
relationship error
#492
Comments
This actually seems like a case where it should be using
|
This could become a separate issue, but should |
I think your on the right track, my first inclination is to look at how the builder adds requests for build requirements vs whatever code is loading the |
Something else that came up from this was due to the way this variants line is written: variants:
- { katana4-platform: ~2022.04.1.4, katana-version: 4.0 } When doing I would go as far as to say that the yaml structure should be changed to avoid the possibility of writing something like this that will get interpreted incorrectly. Or maybe this issue will get addressed. |
I'm pretty sure the solver is configured the same in both cases and the reason the behavior is different is because This problem has resurfaced the ask for a way to do something like |
Pick your poison:
Multiple choice is permitted. |
I'm seeing some really weird behavior out of
I've been trying various inputs and haven't yet found anything that will make it declare it unparsable. Spoke too soon. It will accept |
This setup is expected to solve, but the use of `contains` vs `intersects` prevents finding a solution that uses `spi-platform/2022.4.1.4` when package `openimage` requires `spi-platform/~2022.4.1.3`. Related to #492. Signed-off-by: J Robert Ray <jrray@jrray.org>
Add test to demonstrate how `contains` prevents a setup from solving with `spi-platform/2022.4.1.4` when package `openimage` requires `spi-platform/~2022.4.1.3`. Related to #492. Signed-off-by: J Robert Ray <jrray@jrray.org>
Okay I think I'm following this, so if you change your original command like so: spk env -o katana4-platform=~2022.04.1.4 -o katana-version=4.0 package.spk.yaml@build
spk env katana4-platform=~2022.04.1.4 -o katana-version=4.0 package.spk.yaml@build Then it would work because the I suppose that part of the issue here is the way that you are needing to use packages as platforms, which are weirdly input params but that don't actually need to be in the build env. I do think fundamentally that your 3rd option is desired behavior just in terms of working as one might expect, though the specific tests and changes that we'd need are potentially complex. There was a time where |
What is the right way to simulate asking for a |
it's really just "specify the right '-o' options" at the command line, since I think as of now, specifying a variant is still hidden / not considered a stable feature |
I guess that point I'm making is that using |
Definitely, and I think that in the case of a build environment it probably should be. We'd need to tease out the differences and reconcile how the command line should be working... but that is likely tangential to your overall goal |
https://github.com/imageworks/spk/blob/fbd4a53a7d37edf9cd7c1f67ea7fab56a5207e0b/crates/spk-schema/src/option.rs#L473
I have an example of a solver failure that only fails when using
spk env package.spk.yaml@build
, butspk build package.spk.yaml
succeeds. I haven't figured out what is different about how the solver is configured that makes it only fail in one case and not the other (I have a theory), but I see why in the failure case it is failing.Here is the package spec in question:
spk build --variant 0 package.spk.yaml
succeeds to solve an environment, and that environment containsopenimageio:{build,run}/=2.4.1.3/3P6LYE4O
.My theory: when solving for the build like this, openimageio's build requirements aren't a factor.
spk env -o katana4-platform=~2022.04.1.4 -o katana-version=4.0 package.spk.yaml@build
fails to solve. Critically:TRY openimageio/2.4.1.3/3P6LYE4O - doesn't satisfy requested option: [case 5,0] ~2022.4.1.4 does not contain ~2022.4.1.3
This build of openimageio has this build requirement:
This build is rejected because
~2022.4.1.4
does not "contain"~2022.4.1.3
, per the code above.If we are requiring
~2022.4.1.4
, we should be okay to get a build of something that requires~2022.4.1.3
. Should that code bebase_range.contains(&value_range)
instead?The text was updated successfully, but these errors were encountered: