-
Notifications
You must be signed in to change notification settings - Fork 3
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
Switch build system to Dune #10
Conversation
yes |
Also, you should perhaps comment on the proposal here ocaml/dune#1017 and see how well it addressed your concerns. |
thanks for this, @dra27. I've three questions about this PR:
|
@rgrinberg - possibly, though to be honest it feels more like here there's a |
In that case, you can simply setup a copy rule on the module source. Only if it's really the case that both libraries are mutually exclusive. |
@hannesm - there's a similar question about the version in I did check
* TL;DR My personal opinion on versions is that they belong in the repo, not the history (i.e. the tag is for the convenience of finding the correct source tree) and so |
OK, it's possible that the version should go in |
The last commit there is a way of eliminating the lwt.common package, which restores the previous layout of the Logs_syslog_lwt_common module in both logs_syslog_lwt and logs_syslog_mirage. In the absence of Dune private libraries, it requires that the Logs_syslog_lwt_common module is referred to by its "internal" name. |
@dra27 thanks, and sorry for the delay. now that dune 1.2.0 is out, which includes support for private modules ocaml/dune#1241, any chance you could rebase this PR and use them? :) |
(sorry about my confusion in the latest comment, the private modules feature in dune does not cover the use case here, but @rgrinberg pointed to ocaml/dune#1017 which we can use once it is adapted and implemented). I rebased this PR and #11 on master in #12 -- thanks for your work! |
CHANGES: - support for syslog-message.1.0.0 it split the `message` field of Syslog_message.t into `tag` and `content` use the name of Logs.src as tag when sending messages - move build system to dune (hannesm/logs-syslog#10 by @dra27) - provide Logs_syslog.facility Logs.Tag.def to specify facility in log message, add ?facility as default facility to all reporters (reported in hannesm/logs-syslog#7, fixed in hannesm/logs-syslog#9 by @dra27) - append ':' to source (reported in hannesm/logs-syslog#6, fixed in hannesm/logs-syslog#8 by @dra27) - add missing dependency on unix for logs-syslog.unix (hannesm/logs-syslog#4 by @dra27)
Working recently on the features which led to #5, #8, #9, and also verbosemode/syslog-message#17 I experienced first-hand how suboptimal developing with opam pins is for someone contributing across several libraries.
As a retrospect to the work, I offer a switch of build system to Dune - as is so often the case, the diff deletes more than it adds. I've checked that the build is equivalent, at least as far as findlib is concerned. Dune is somewhat opinionated about the names of library archives, so they have to have underscores rather than hyphens, but this should have no effect since the findlib package name is unchanged. There is one niggle, since Dune doesn't allow a module to be included in multiple archives: I have packaged
Logs_syslog_lwt_common
in alogs-syslog.lwt.common
package. This is not ideal, as it exposes it - the alternative is to haveLogs_syslog_mirage_common
and have rules which automatically copy the ml and mli file (@diml, @rgrinberg - I think that's the best solution at the moment?)I've written about the experience here, and I hope the comparison may provide persuasion, if needed, for why Dune is a good upgrade.
I haven't used it, but please note @samoht's dune-release tool, which I believe provides everything which
topkg-care
did before.