Skip to content

Rewrite opam-path tutorial as 'The OCaml Development Environment'#3580

Open
cuihtlauac wants to merge 2 commits into
mainfrom
tutorial-dev-environment
Open

Rewrite opam-path tutorial as 'The OCaml Development Environment'#3580
cuihtlauac wants to merge 2 commits into
mainfrom
tutorial-dev-environment

Conversation

@cuihtlauac
Copy link
Copy Markdown
Collaborator

Summary

  • Rewrites the minimal 0_09_opam_path.md (99 lines, 3 short sections) into a comprehensive guide (~210 lines) covering the full OCaml development environment
  • Adds platform-specific syntax for eval $(opam env) on Linux, macOS (bash/zsh/fish), and Windows (PowerShell/cmd)
  • Explains when to use eval $(opam env) vs opam exec -- vs direnv, with a decision table
  • New section on configuring LLM coding agents (Claude Code, Cursor, Copilot) — agents need opam exec -- since each command runs in a fresh shell
  • Reference table of OCaml environment variables (OCAMLRUNPARAM, OCAML_COLOR, OCAMLPATH, DUNE_CACHE, etc.)
  • Platform notes (Apple Silicon, Windows DkML/WSL2, Docker sandboxing)
  • Troubleshooting section for common environment issues
  • Adds "opam-path" to opam-switch-introduction's recommended next tutorials

Keeps id: "opam-path" to preserve existing URLs and links.

Test plan

  • make build succeeds (tutorial frontmatter parsing, cross-reference validation)
  • Review rendered page at /docs/opam-path
  • Verify cross-reference link from /docs/opam-switch-introduction works

🤖 Generated with Claude Code

…t Environment"

Expand the minimal opam-path tutorial (99 lines) into a comprehensive
guide (~210 lines) covering:

- What environment variables an opam switch sets and why
- eval $(opam env) with platform-specific syntax (Linux, macOS, Windows)
- opam exec -- as the stateless alternative
- direnv for automatic per-directory setup
- When to use which method (decision table)
- Configuring LLM coding agents (Claude Code, Cursor, Copilot)
- Reference table of other OCaml environment variables
- Platform-specific notes and troubleshooting

Also add "opam-path" to opam-switch-introduction's recommended next
tutorials.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- MD014: Remove `$ ` prefix from shell code blocks without output
- MD036: Convert bold pseudo-headings to ### headings in Troubleshooting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant