Module rebar_compiler_dag

Data Types

critical_meta()

critical_meta() = term()

dag()

dag() = digraph:graph()

Function Index

compile_order/4Return the reverse sorting order to get dep-free apps first.
init/4You should initialize one DAG per compiler module.
maybe_store/5Store the DAG on disk if it was dirty.
populate_deps/3Scan all files in the digraph that are seen as dependencies, but are neither source files nor artifacts (i.e.
populate_sources/5this function scans all the source files found and looks into all the InDirs for deps (other source files, or files that aren't source but still returned by the compiler module) that are related to them.
propagate_stamps/1Take the timestamps/diff changes and propagate them from a dep to the parent; given: A 0 -> B 1 -> C 3 -> D 2 then we expect to get back: A 3 -> B 3 -> C 3 -> D 2 This is going to be safe for the current run of regeneration, but also for the next one; unless any file in the chain has changed, the stamp won't move up and there won't be a reason to recompile.
prune/5Clear up inactive (deleted) source files from a given project.
status/4Quickly validate whether a DAG exists by validating its file name, version, and CritMeta data, without attempting to actually build it.
store_artifact/4
terminate/1

Function Details

compile_order/4

compile_order(G, AppDefs, SrcExt, ArtifactExt) -> any()

Return the reverse sorting order to get dep-free apps first.

init/4

init(Dir::file:filename_all(), Compiler::atom(), Label::string() | undefined, CritMeta::critical_meta()) -> dag()

You should initialize one DAG per compiler module. CritMeta is any contextual information that, if it is found to change, must invalidate the DAG loaded from disk.

maybe_store/5

maybe_store(G, Dir, Compiler, Label, CritMeta) -> any()

Store the DAG on disk if it was dirty

populate_deps/3

populate_deps(G, SourceExt, ArtifactExts) -> any()

Scan all files in the digraph that are seen as dependencies, but are neither source files nor artifacts (i.e. header files that don't produce artifacts of any kind).

populate_sources/5

populate_sources(G, Compiler, InDirs, Sources, DepOpts) -> any()

this function scans all the source files found and looks into all the InDirs for deps (other source files, or files that aren't source but still returned by the compiler module) that are related to them.

propagate_stamps/1

propagate_stamps(G) -> any()

Take the timestamps/diff changes and propagate them from a dep to the parent; given: A 0 -> B 1 -> C 3 -> D 2 then we expect to get back: A 3 -> B 3 -> C 3 -> D 2 This is going to be safe for the current run of regeneration, but also for the next one; unless any file in the chain has changed, the stamp won't move up and there won't be a reason to recompile. The obvious caveat to this one is that a file changing by restoring an old version won't be picked up, but this weakness already existed in terms of timestamps.

prune/5

prune(G, SrcExt, ArtifactExt, Sources, AppPaths) -> any()

Clear up inactive (deleted) source files from a given project. The file must be in one of the directories that may contain source files for an OTP application; source files found in the DAG G that lie outside of these directories may be used in other circumstances (i.e. options affecting visibility, extra_src_dirs). Prune out files that have no corresponding sources

status/4

status(Dir::file:filename_all(), Compiler::atom(), Label::string() | undefined, CritMeta::critical_meta()) -> valid | bad_format | bad_vsn | bad_meta | not_found

Quickly validate whether a DAG exists by validating its file name, version, and CritMeta data, without attempting to actually build it.

store_artifact/4

store_artifact(G, Source, Target, Meta) -> any()

terminate/1

terminate(G) -> any()


Generated by EDoc