Thanks to visit codestin.com
Credit goes to github.com

Skip to content

discover: Sanity check compilation before checking for missing dependencies#313

Merged
aantron merged 1 commit intoocsigen:masterfrom
timbertson:discover-trivial-check
Apr 4, 2017
Merged

discover: Sanity check compilation before checking for missing dependencies#313
aantron merged 1 commit intoocsigen:masterfrom
timbertson:discover-trivial-check

Conversation

@timbertson
Copy link
Contributor

I have a bit of a novel environment in opam2nix where only the (transitive) dependencies are made available to each package while building. Because of this, lwt does not have ncurses available unless it depends transitively on on an ncurses depext (or conf-ncurses). There's been a lot of back and forth on where the dependency on ncurses belongs, but it hopefully won't be contentious to fail earlier if a basic toplevel can't be compiled.

This PR gives a better error message - currently lwt tells me that "pthread" isn't available, because that's just the first thing it attempts to compile. This is misleading, since it would tell me everything is unavailable except for the real problem (in my case, ncurses).

@timbertson
Copy link
Contributor Author

(heh, somehow I manage to keep hitting this - from three years ago: #33)

As a related matter, I just checked the opam-repository and it's unfortunately very divided on whether lwt needs curses or not:

$ find . -name opam | xargs grep --files-with-match curses | sort
./lwt.2.4.5/opam
./lwt.2.4.6/opam
./lwt.2.4.7/opam
./lwt.2.4.8/opam
./lwt.2.5.0/opam
./lwt.2.5.1/opam
./lwt.2.5.2/opam

$ find . -name opam | xargs grep --files-without-match curses | sort
./lwt.2.3.2/opam
./lwt.2.4.0/opam
./lwt.2.4.1/opam
./lwt.2.4.2/opam
./lwt.2.4.3/opam
./lwt.2.4.4/opam
./lwt.2.6.0/opam
./lwt.2.7.0/opam

I know lwt only depends on curses because it builds a custom toplevel, but it would be good to be consistent (and obviously I'd vote for including the dependency, since that makes my life easier ;))

@rgrinberg
Copy link
Contributor

I know the toplevel is deprecated and probably only on life support at this point. But it would be nice if it was its own opam sub package as well as I'm not sure how long we'd wait for 3.0.

@aantron aantron merged commit c4e1834 into ocsigen:master Apr 4, 2017
@aantron
Copy link
Collaborator

aantron commented Apr 4, 2017

Thanks for this, and the other PR.

I'm pretty sure simple-top isn't used anymore, and we will just remove it completely, in the next major version of Lwt (4.0.0, I guess). Of course, that will be preceded by proper warnings and announcements.

3.0.0 is coming out this weekend (hopefully).

@aantron aantron mentioned this pull request May 22, 2017
aantron added a commit that referenced this pull request Dec 23, 2017
Resolves #371.

The changes to discover.ml done in #313 are left in place, because I am
not sure if we still want to pass the -custom flag.
aantron added a commit that referenced this pull request Mar 24, 2018
Resolves #371.

The changes to discover.ml done in #313 are left in place, because I am
not sure if we still want to pass the -custom flag.
aantron added a commit that referenced this pull request Mar 24, 2018
Resolves #371.

The changes to discover.ml done in #313 are left in place, because I am
not sure if we still want to pass the -custom flag.
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.

3 participants

Comments