Module Unit_info.Artifact

Build artifacts

type t

Metadata for a single compilation artifact:

  • the module name associated to the artifact
  • the filesystem path
  • the input source file if it exists
val original_source_file : t -> filename option

original_source_file a is the original source file of a if it exists. See Unit_info.original_source_file for a description of the distinction of "original" vs "raw" source file

val raw_source_file : t -> filename option

raw_source_file a is the raw source file of a if it exists. See Unit_info.raw_source_file for a description of the distinction of "original" vs "raw" source file

val prefix : t -> file_prefix

prefix a is the filename prefix of the compilation artifact.

val filename : t -> filename

filename u is the filesystem path for a compilation artifact.

val modname : t -> Compilation_unit.t

modname a is the module name of the compilation artifact.

val from_filename : for_pack_prefix:Compilation_unit.Prefix.t -> filename -> t

from_filename ~for_pack_prefix filename reconstructs the module name modname_from_source filename associated to the artifact filename, assuming the pack prefix is for_pack_prefix.