Skip to content

feat: add opam support #1298

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

Merged
merged 1 commit into from
Jul 25, 2024
Merged

feat: add opam support #1298

merged 1 commit into from
Jul 25, 2024

Conversation

smorimoto
Copy link
Contributor

This PR adds support for opam.

@smorimoto
Copy link
Contributor Author

direnv is mentioned in the official OCaml documentation, so having a formal way for direnv to layout does not seem like a bad idea. I often have projects that use OCaml with Node.js, and I just wanted to use layout node and layout opam together, but in the long run it's pretty convenient to be able to maintain changes on the opam side in one place.

@zimbatm
Copy link
Member

zimbatm commented Jul 13, 2024

sounds good!

@smorimoto
Copy link
Contributor Author

Gentle ping

Signed-off-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
@smorimoto
Copy link
Contributor Author

If opam switch is not initialized, this error will happen, but the OPAMSWITCH variable is exposed, so opam will definitely not point to any different switch and will not cause unexpected behavior.

❯ direnv allow

direnv: loading ~/src/github.com/kuis-isle3sw/IoPLMaterials/.envrc
[ERROR] The selected switch /Users/smorimoto/src/github.com/kuis-isle3sw/IoPLMaterials is not installed. Please fix the value of the OPAMSWITCH environment variable, or use the '--switch <name>' flag
direnv: export +OPAMSWITCH

@smorimoto
Copy link
Contributor Author

@zimbatm Ready to merge!

@zimbatm zimbatm merged commit 68978ef into direnv:master Jul 25, 2024
13 checks passed
@smorimoto smorimoto deleted the add-opam-support branch July 25, 2024 08:19
@smorimoto
Copy link
Contributor Author

@zimbatm Thank you for your review and the effort you put into creating and maintaining this software!

@smorimoto
Copy link
Contributor Author

@zimbatm Could you create a new release for this PR?

@smorimoto
Copy link
Contributor Author

Gentle reminder

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

Successfully merging this pull request may close these issues.

2 participants