Skip to content

Conversation

@jrray
Copy link
Collaborator

@jrray jrray commented Sep 24, 2025

It is expected that the solver will make an effort to resolve packages that fit the options, even though it is not required to. Create a test where multiple builds exist with different values for a var and add an option to the solver for a specific value. A build exists with that value so the solver should pick it.

@jrray jrray added bug Something isn't working solver related to the solver part of spk labels Sep 24, 2025
@jrray
Copy link
Collaborator Author

jrray commented Sep 24, 2025

I labeled this with bug because the step solver doesn't pass the test. First things first, do we believe this test is valid and should pass?

@jrray jrray force-pushed the solver-options-test branch from eaf420e to 3d7e479 Compare September 24, 2025 16:16
It is expected that the solver will make an effort to resolve packages
that fit the options, even though it is not required to. Create a test
where multiple builds exist with different values for a var and add an option
to the solver for a specific value. A build exists with that value so
the solver should pick it.

Signed-off-by: J Robert Ray <[email protected]>
@jrray jrray force-pushed the solver-options-test branch from 3d7e479 to ccb7100 Compare September 24, 2025 16:30
@jrray
Copy link
Collaborator Author

jrray commented Sep 24, 2025

solver.update_options(option_map);

This is the only place in the codebase (outside of test code) that calls Solver::update_options. The test suite still passes if this line is removed (on the main branch).

The new test in this PR demonstrates that setting options, at least in this trivial case, doesn't seem to do anything. Using --opt on the command line turns those things into var requests. We don't seem to be negatively impacted by the fact that this new test doesn't pass. Is it worth the effort to try to make it pass? What if instead we remove the concept of options? We keep var requests and the --opt flag and all the current behavior stays the same.

@rydrman
Copy link
Collaborator

rydrman commented Oct 15, 2025

From the meeting today:

  • the only concern here is whether it would have an impact on build ordering (seems like now) but related to that is with source builds
  • likely we can remove this part of the solver interface altogether, but we do still want the solution to contain the options from the resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working solver related to the solver part of spk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants