You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case: target depends on a cmi only (Tezos does this). If we have the mli file then we just use ocaml_signature. If we have a singleton (only the ml file), then we have two options:
a. compile the ml file and depend on the resulting cmi
b. extract the mli from the ml and compile it.
Does it ever make sense to do b and not a? If so, we need to either enhance ocaml_signature to support this use case, or use a genrule to run ocamlc -i, or create a new rule. For now, assume option a will suffice.
The text was updated successfully, but these errors were encountered:
Either way, we need a way to express this dependency in the language. We can express a dependency on a module, but the ocaml_module rule always delivers both a cmi file and a .cmo (or .cmx, .o)
Scenario: some kind of processing tool takes .cmi files as input. To use it with a module dependency, we would need an intermediate step to extract the .cmi from the module output.
The brute force way would be to write a genrule and then use $(locations) to get the module output and write some shell code to find the cmi. Or something like that.
Use case: target depends on a cmi only (Tezos does this). If we have the mli file then we just use ocaml_signature. If we have a singleton (only the ml file), then we have two options:
a. compile the ml file and depend on the resulting cmi
b. extract the mli from the ml and compile it.
Does it ever make sense to do b and not a? If so, we need to either enhance ocaml_signature to support this use case, or use a genrule to run
ocamlc -i
, or create a new rule. For now, assume option a will suffice.The text was updated successfully, but these errors were encountered: