Skip to content
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

Discard "internal heuristics", add builtin solver using ocaml-mccs #3011

Merged
merged 25 commits into from
Aug 17, 2017

Conversation

AltGr
Copy link
Member

@AltGr AltGr commented Jul 31, 2017

Note: not for merge right away, this needs the new build-system to be finalised first

@AltGr
Copy link
Member Author

AltGr commented Aug 8, 2017

Now based on the merged jbuilder patches, and cleaned up (supporting build without mccs): should be ready.

@dra27
Copy link
Member

dra27 commented Aug 8, 2017

Can I have until Friday afternoon to try this on Windows and review further?

One immediate thought: I think the dynamic selection of static-linking.sexp is wrong (because it's not future-proof). I would either have it that configure copies static-linking.sexp.true if static linking is wanted and the jbuild rule is just (with-stdout-to ${@} (echo "()")) with no dependencies (so you get dynamic linking if you build without running configure) or, and this is probably better, define an additional package opam-static in src/client/jbuild with a different library and push the static/dynamic option back to ocaml-mccs (so opam-mccs also defines a findlib package ocaml-mccs.static).

@AltGr
Copy link
Member Author

AltGr commented Aug 8, 2017

Going through the env is clearly a temporary hack, until there is a better way to select the version we want. Two different targets/aliases would nicely do the trick, but I am not sure how they would relate to the opam package (which shouldn't include both... ?)

@AltGr AltGr force-pushed the ocaml-mccs branch 5 times, most recently from 987d06f to c04c318 Compare August 14, 2017 13:30
…l solvers

Also, disables the "internal heuristics" solver (but this patch doesn't
remove it yet)

This also makes the 'best-effort' parameter configurable.
so that the file can easily be swapped with a dummy one with `is_present
= lazy false` and no implementation, when compiling without Mccs.
'make opam-static'
- choose newer version more agressively (put uptodate criteria before
  minimise changes criteria). This prevents many cases of getting a very
  old version of a lib because newer ones have new requirements (e.g.
  `base-bytes`)
- remove duplication that was there to guarantee compat with much older versions:
  `-notuptodate(foo),-sum(foo,version-lag)` is now just
  `-sum(foo,version-lag)`. While slightly different, it isn't worse, and
  is simpler.
  It is also closer to the criteria we use for mccs.
(don't pin to dev in the bootstrap phase, that should remain as stable
as possible!)
@AltGr
Copy link
Member Author

AltGr commented Aug 15, 2017

Mostly OK now. Remaining issues:

  • OCAML_VERSION=4.03.0 OPAM_TEST=1 EXTERNAL_SOLVER= glpk wasn't found, and opam was compiled without internal sover. Therefore, forcing the internal solver fails.
  • OCAML_VERSION=4.03.0 OPAM_TEST=1 EXTERNAL_SOLVER=aspcud the check for aspcud version seems broken (on older aspcud)
  • OCAML_VERSION=4.05.0 OPAM_TEST= tests from the opam repo seem to fail, need to investigate, but this test is new
  • osx OCAML_VERSION=4.03.0 OPAM_TEST=1 EXTERNAL_SOLVER= seems that re is still missing ?
  • osx OCAML_VERSION=4.03.0 OPAM_TEST=1 "no external solver found" ?

@AltGr AltGr force-pushed the ocaml-mccs branch 2 times, most recently from 24764f6 to a2d66f0 Compare August 15, 2017 13:34
@AltGr
Copy link
Member Author

AltGr commented Aug 15, 2017

Ah, the bootstrap opam (1.2.2) doesn't correctly extract the opam file from the ocaml-mccs archive.
This means we're stalled by ocaml/opam-repository#10075

@AltGr AltGr force-pushed the ocaml-mccs branch 2 times, most recently from 34b1409 to e429939 Compare August 16, 2017 13:15
@AltGr
Copy link
Member Author

AltGr commented Aug 16, 2017

Finally ! All tests pass :)

@AltGr AltGr merged commit 51a58f4 into master Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants