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
Add an OCAML_TOPLEVEL_PATH variable to ocaml #7808
Comments
Comment author: @nojb Note that you can already do this today by using OCAMLPARAM, e.g. OCAMLPARAM=I=,I=,_ ocaml will result in and to be added to the list of include directories. |
Comment author: @dbuenzli Sure but I'd rather not use OCAMLPARAM for that as it affects all the ocaml tools and may be used by switches for other purposes. |
Comment author: @gasche The request seems sensible to me, but I think that the current name is a bit misleading (to me it says where to find the toplevel binary), I would expect INCLUDE_PATH to be in the name. |
Comment author: @dbuenzli Agreed on the name, I just reused what opam devs initially used. Here are a few candidates OCAML_INCLUDE_PATH Logic would go for OCAML_INCLUDE_PATH but this could be mistaken as applying to the compilers or one might want to reserve it for that purpose to follow the example of C_INCLUDE_PATH. Maybe OCAMLTOP_INCLUDE_PATH ? |
Comment author: @nojb Merged, will be in 4.08. |
Original bug ID: 7808
Reporter: @dbuenzli
Assigned to: @nojb
Status: resolved (set by @nojb on 2018-12-02T15:07:39Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.06.1
Fixed in version: 4.08.0+dev/beta1/beta2
Category: toplevel
Monitored by: @nojb @gasche @dbuenzli
Bug description
In the new world of opam and its system and non-system switches allowing both:
ocaml
#use "topfind"
and
#!/usr/bin/env ocaml
#use "topfind"
to work correctly has proven to be a dire source of hacks and workarounds (I can provide full details if one needs to be convinced).
It turns out that letting the
ocaml
binary be affected by an OCAML_TOPLEVEL_PATH variable, whose semantics would simply be to add the colon separated directories to the includes (#directory include) would allow us to get rid of all of these hacks.Slightly related to #7770
The text was updated successfully, but these errors were encountered: