compile

package
v0.408.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package compile compiles FTL Go module source into a deployable executable.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidateDependencies = errors.New("dependencies need to be updated")

Functions

func Build added in v0.96.0

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 added in v0.386.0

func ExtractDependencies(config moduleconfig.AbsModuleConfig) ([]string, error)

func GenerateStubs added in v0.386.0

func GenerateStubs(ctx context.Context, dir string, moduleSch *schema.Module, config moduleconfig.AbsModuleConfig, nativeConfig optional.Option[moduleconfig.AbsModuleConfig]) error

func SyncGeneratedStubReferences added in v0.285.2

func SyncGeneratedStubReferences(ctx context.Context, config moduleconfig.AbsModuleConfig, stubsDir string, stubbedModules []string) error

Types

type ExternalModuleContext added in v0.155.0

type ExternalModuleContext struct {
	GoVersion    string
	FTLVersion   string
	Module       *schema.Module
	Replacements []*modfile.Replace
}

type MainWorkContext added in v0.277.2

type MainWorkContext struct {
	GoVersion          string
	SharedModulesPaths []string
	IncludeMainPackage bool
}

type OngoingState added in v0.397.1

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 added in v0.397.1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL