Skip to content

Add opam-switch-mode to  lang: coq and fix configuration of opam-switch-mode in lang: ocaml#8132

Draft
jeremyThibault wants to merge 5 commits into
doomemacs:masterfrom
jeremyThibault:master
Draft

Add opam-switch-mode to  lang: coq and fix configuration of opam-switch-mode in lang: ocaml#8132
jeremyThibault wants to merge 5 commits into
doomemacs:masterfrom
jeremyThibault:master

Conversation

@jeremyThibault

@jeremyThibault jeremyThibault commented Oct 31, 2024

Copy link
Copy Markdown

This PR adds configuration to install and use opam-switch-mode to manage opam switches to the coq module. The configuration is taken almost straight from PR #7806 which added the same capability to the ocaml module. The only difference is that, unlike in the ocaml module, we do not initialize the environment right away.
Incidentally, we need to wrap this initialization inside the ocaml module, or it will try to execute even if tuareg isn't loaded and produce an error.

Note that this is my first PR, and that I am not very familiar with Emacs and use-package, so I'm not very confident that commit bdb4d60 is doing the right thing; at least, it seems to work on my machine.
I'm also not sure if it's fine to use the same package! in two different, non-mutually-exclusive modules.


  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
  • My commits conform to Doom's git conventions.
  • Any relevant issues or PRs have been linked to.

@hlissner hlissner marked this pull request as draft November 1, 2024 01:43
@hlissner hlissner added is:bug Something isn't working as intended is:feature Adds or requests new features, or extends existing ones :lang coq Pertains to Doom's :lang coq module :lang ocaml Pertains to Doom's :lang ocaml module labels Nov 1, 2024
@hlissner hlissner added this to the modules v24.12 milestone Nov 1, 2024
This fixes an issue where `tuareg-opam-current-compiler` would be
undefined if `opam-switch-mode` was loaded before `tuareg`.
Some Rocq users don't use OPAM, so I add a new flag
that can be used to turn off loading features that
depend on `opam`, such as `opam-switch-mode`.
Some OCaml users don't use OPAM, so I add a new flag
that can be used to turn off loading features that
depend on `opam`, such as `opam-switch-mode`.
@bamarsha

Copy link
Copy Markdown

@hlissner Why was this marked as draft? What can be done to help get this ready to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is:bug Something isn't working as intended is:feature Adds or requests new features, or extends existing ones :lang coq Pertains to Doom's :lang coq module :lang ocaml Pertains to Doom's :lang ocaml module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants