Open dsheets opened 8 years ago
Packages can actually define variables at install time, so this is difficult, at least for package-qualified variables %{pkg:var}%
.
On the next
branch of opam, compilers (which are packages), can export variables to the global namespaces (e.g. ocaml-version
, which is largely used in packages) ;
However, the repository should define a set of variables that are required to be defined by any compiler. This once again shows the need for having both the built-in, repository-independent opam lint
rules and repository-specific rules. Camelus should, obviously, be configurable to enforce the repository rules.
If a typo is made to a built-in variable name like writing
or
instead ofos
, Camelus does not warn about it. It should be possible to declare the set of bound-or-potentially-bound variables and have warnings emitted if variables from outside that set are used.