Documentation ¶
Overview ¶
Package compile compiles FTL Go module source into a deployable executable.
Index ¶
- Variables
- func Build(ctx context.Context, projectRootDir, stubsRoot string, ...) (moduleSch optional.Option[*schema.Module], buildErrors []builderrors.Error, ...)
- func ExtractDependencies(config moduleconfig.AbsModuleConfig) ([]string, error)
- func GenerateStubs(ctx context.Context, dir string, moduleSch *schema.Module, ...) error
- func SyncGeneratedStubReferences(ctx context.Context, config moduleconfig.AbsModuleConfig, stubsDir string, ...) error
- type ExternalDeploymentContext
- type MainWorkContext
- type OngoingState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidateDependencies = errors.New("dependencies need to be updated")
Functions ¶
func Build ¶
func Build(ctx context.Context, projectRootDir, stubsRoot string, config moduleconfig.AbsModuleConfig, sch *schema.Schema, deps, buildEnv []string, filesTransaction watch.ModifyFilesTransaction, ongoingState *OngoingState, devMode bool) (moduleSch optional.Option[*schema.Module], buildErrors []builderrors.Error, err error)
Build the given module.
func ExtractDependencies ¶
func ExtractDependencies(config moduleconfig.AbsModuleConfig) ([]string, error)
func GenerateStubs ¶
func GenerateStubs(ctx context.Context, dir string, moduleSch *schema.Module, config moduleconfig.AbsModuleConfig, nativeConfig optional.Option[moduleconfig.AbsModuleConfig]) error
func SyncGeneratedStubReferences ¶
func SyncGeneratedStubReferences(ctx context.Context, config moduleconfig.AbsModuleConfig, stubsDir string, stubbedModules []string) error
Types ¶
type MainWorkContext ¶
type OngoingState ¶
type OngoingState struct {
// contains filtered or unexported fields
}
OngoingState maintains state between builds, allowing the Build function to skip steps if nothing has changed.
func (*OngoingState) DetectedFileChanges ¶
func (s *OngoingState) DetectedFileChanges(config moduleconfig.AbsModuleConfig, changes []watch.FileChange)
DetectedFileChanges should be called whenever file changes are detected outside of the Build() function. This allows the OngoingState to detect if files need to be reprocessed.
Click to show internal directories.
Click to hide internal directories.