logo

class

compiler::CompilerInput

sys::Obj
  compiler::CompilerInput

CompilerInput encapsulates all the input needed run the compiler. The compiler can be run in one of two modes - file or str. In file mode the source code and resource files are read from the file system. In str mode we compile a single source file from an in-memory string.

Slots

depends

Depend[] depends := Depend[,]

List of this pod's dependencies used for both the compiler checking and output in the pod's manifest.

Source

dependsDir

File dependsDir := null

The directory to look in for the dependency pod file (and potentially their recursive dependencies). If null then we use the compiler's own pod definitions via reflection (which is more efficient).

Source

description

Str description := ""

Description to include in output pod's manifest.

Source

homeDir

File homeDir

Root directory of source tree - this directory is used to create the relative paths of the resource files in the pod zip.

Source

includeDoc

Bool includeDoc := false

Include fandoc in output pod, default is false

Source

includeSrc

Bool includeSrc := false

Include source code in output pod, default is false

Source

inputLoc

Location inputLoc := Location.make("CompilerInput")

Location to use for reporting errors associated with the input itself - typically this is mapped to the build script.

Source

isScript

Bool isScript := false

Flag to indicate if we are are compiling a script. Scripts don't require explicit depends and can import any type via the using statement or with qualified type names.

Source

isTest

Bool isTest := false

Is this compile process being run inside a test, default is false

Source

log

CompilerLog log := CompilerLog.make

Log used for reporting compile status

Source

mode

CompilerInputMode mode := null

This mode determines whether the source code is input from the file system or from an in-memory string.

Source

outDir

File outDir := Sys.homeDir() + `lib/fan/`

Output directory to write pod to, defaults to the current runtime's lib directory

Source

output

CompilerOutputMode output := null

What type of output should be generated - the compiler can be used to generate a transient in-memory pod or to write out a pod zip file to disk.

Source

podFacets

Str:Obj podFacets := Str:sys::Obj][:]

User defined pod level facets.

Source

podName

Str podName

Required name of output pod

Source

resDirs

File[] resDirs := File[,]

Optional list of directories containing resources files to include in the pod zip (file mode only)

Source

srcDirs

File[] srcDirs

List of directories containing fan source files (file mode only)

Source

srcStr

Str srcStr

Fan source code to compile (str mode only)

Source

srcStrLocation

Location srcStrLocation

Location to use for SourceFile facet (str mode only)

Source

version

Version version := Version.fromStr("0.0.0")

Version to include in ouput pod's manifest.

Source