-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow to define dependencies as "development only", regardless how the package is built #4959
Comments
From dev meeting: |
Do we need this variable only in packages filters ( |
Only |
I don't see issues on adding them for |
OCaml has developer-mode settings in configure, for example, it’d be handy to be able to turn them on (or, rather, prevent them from being turned off, which is the usual opam default) |
On some reason project the build command is wrapped with refmterr a tool that convert errors messages in reason syntax and propose fix (a bit less useful since OCaml has better error message). So having two build command can be handy. Also dev might be tempted to use I don't see reason to have install dependent of this variable. Maybe more sanity check when installing in dev mode. |
backported comment from PR #5016 (comment)
/cc @dbuenzli |
@kit-ty-kate asked me to comment on #5214 but I'm going to do this here.
Regarding 1. I think there's quite a bit of potential confusion on Regarding 2. I think it boils down to define what the semantics of the If you ask me, If we take So here is my suggestion:
|
Thank you for the review!
So for these reason, I'm in favour of changing |
Sometimes it's better to not let people do what they could want in theory. It's always possible to add arbitrary complexity to a system and programmers seem especially keen to do so in their builds. Without a concrete use case I wouldn't let the design be guided by this "theory". Besides in the case you mention it doesn't seem horrible to then simply add the dependency as I think having a clear separation between |
Note that `with-doc` is not technically the right description for `ocamlformat`. We use it because `with-dev` is not yet available (see ocaml/opam#4959). In the meantime, this is a better solution than `dev` as pointed out in ocaml/opam-repository@c8ef9df
At the moment, there is the option of using
{dev}
variable to define "development dependencies" in a package X. However, this doesn't work when the applications or packages that depend on X are not building it from a release archive.As a more concrete example, as an author of a package, I would like to define
ocamlformat
as a development dependency of my package for those that want to contribute and develop features on it, but not imposeocamlformat
as a dependency of those users that depend on my package, regardless how they build it (from a release archive or otherwise).Maybe there could be a new option
--recommended-dev
to support this use case, or awith-dev
variable, similar towith-test
andwith-doc
.The text was updated successfully, but these errors were encountered: