Skip to content

Add an explanation of how plugins work to the manual#5627

Merged
rjbou merged 1 commit intoocaml:masterfrom
kit-ty-kate:plugin-doc
Feb 5, 2025
Merged

Add an explanation of how plugins work to the manual#5627
rjbou merged 1 commit intoocaml:masterfrom
kit-ty-kate:plugin-doc

Conversation

@kit-ty-kate
Copy link
Copy Markdown
Member

This is fairly hard to explain. Does anyone know a better way to explain it?

cc @christinerose

This directory contains symlinks to binaries installed in whichever opam switch
the plugin it belongs to was installed in.
These symlinks are added for any packages that have the ["plugin" flag](#opamflag-plugin)
and have a binary matching their package name. If no binaries with the same name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the binary only has to match the opam package name by convention; it's not a hard requirement.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a "hard" requirement. A warning will be displayed otherwise and the link will not appear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite right. The manual needs a tweak to reflect that as well:
https://opam.ocaml.org/doc/Manual.html#opamflag-plugin

plugin: the package installs a program named opam- and may be auto-installed and run with opam . The convention is to name the plugin package opam-.

Copy link
Copy Markdown
Contributor

@christinerose christinerose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of suggestions....

@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Sep 25, 2024
@rjbou rjbou merged commit 4082943 into ocaml:master Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants