Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

[WIP] [#302] Solution now exposes messages and warnings. #732

Closed
wants to merge 2 commits into from

Conversation

mikijov
Copy link
Contributor

@mikijov mikijov commented Jun 8, 2017

WIP for issue #302, attempting to report ineffectual constraints. Considering solver.Solve() and Solution struct have no way of reporting messages/warnings, I have decided to add generic Solution.Messages() []string method that can return generic string messages.

The fix is using rootdata.getApplicableConstraints(), where I have modified it to return both applicable and ineffectual (not applicable) ones.

I need a bit of help/hint with the one of the test cases. In the test TestBasicSolves/override_dep's_constraint I do not understand why is "b 2.0.0" reported as ineffectual, because it is also part of the solution.

I would also like your opinions if you are OK with this way of reporting warnings, or would you like a more elaborate, i.e. struct based rather then string warnings, that can return actionable meta data.

I have enhanced rootdata.getApplicableContraints() to now also return
unused (ineffectual) constraints.

Remaining issue is that one test still fails, and I am unsure why.
@sdboyer
Copy link
Member

sdboyer commented Jun 8, 2017

Ack, I'm sorry it took me so long to respond on this - you went ahead with the approach of expanding Solution, but that isn't the way should go with this. (Please see comment over in the issue)

@mikijov mikijov closed this Jun 15, 2017
@mikijov mikijov deleted the issue302 branch June 24, 2017 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants