runner

package
v0.10.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Index

Constants

View Source
const EXTERNAL_PKGS_ARG_PATTERN = "%s=%s"

The pattern of the external package argument.

Variables

This section is empty.

Functions

func FindModRootFrom added in v0.3.6

func FindModRootFrom(startPath string) (string, *reporter.KpmEvent)

FindModRootFrom will find the kcl.mod path from the start path.

func GetKclVersion added in v0.8.0

func GetKclVersion() string

GetKclVersion fetches the kcl version

Types

type Compiler

type Compiler struct {
	// contains filtered or unexported fields
}

Compiler is a wrapper of kcl compiler.

func DefaultCompiler

func DefaultCompiler() *Compiler

DefaultCompiler will create a default compiler.

func NewCompilerWithOpts added in v0.3.4

func NewCompilerWithOpts(opts *opt.CompileOptions) *Compiler

func (*Compiler) AddDepPath

func (compiler *Compiler) AddDepPath(depName string, depPath string) *Compiler

AddDep will add a file path to the dependency list.

func (*Compiler) AddKFile

func (compiler *Compiler) AddKFile(kFilePath string) *Compiler

AddKFile will add a k file to the compiler.

func (*Compiler) AddKclOption

func (compiler *Compiler) AddKclOption(opt kcl.Option) *Compiler

AddKclOption will add a kcl option to the compiler.

func (*Compiler) Run

func (compiler *Compiler) Run() (*kcl.KCLResultList, error)

Call KCL Compiler and return the result.

type Entry added in v0.3.6

type Entry struct {
	// contains filtered or unexported fields
}

Entry is the entry of 'kpm run'.

func FindRunEntryFrom added in v0.3.6

func FindRunEntryFrom(sources []string) (*Entry, *reporter.KpmEvent)

FindRunEntryFrom will find the entry of the compilation from the entry sources.

func (*Entry) AddEntryFile added in v0.3.6

func (e *Entry) AddEntryFile(entrySource string)

AddEntryFile will add a entry file to the entry.

func (*Entry) EntryFiles added in v0.3.6

func (e *Entry) EntryFiles() []string

EntryFiles will return the entry files of the entry.

func (*Entry) IsEmpty added in v0.3.6

func (e *Entry) IsEmpty() bool

IsEmpty will return true if the entry is empty.

func (*Entry) IsGit added in v0.8.0

func (e *Entry) IsGit() bool

func (*Entry) IsLocalFile added in v0.3.6

func (e *Entry) IsLocalFile() bool

IsLocalFile will return true if the entry is a local file.

func (*Entry) IsLocalFileWithKclMod added in v0.3.6

func (e *Entry) IsLocalFileWithKclMod() bool

IsLocalFileWithKclMod will return true if the entry is a local file with 'kcl.mod'.

func (*Entry) IsRef added in v0.3.6

func (e *Entry) IsRef() bool

IsRef will return true if the entry is a ref.

func (*Entry) IsTar added in v0.3.6

func (e *Entry) IsTar() bool

IsTar will return true if the entry is a tar.

func (*Entry) IsUrl added in v0.3.6

func (e *Entry) IsUrl() bool

IsUrl will return true if the entry is a url.

func (*Entry) Kind added in v0.3.6

func (e *Entry) Kind() EntryKind

Kind will return the kind of the entry.

func (*Entry) PackageSource added in v0.3.6

func (e *Entry) PackageSource() string

PackageSource will return the package source of the entry.

func (*Entry) SetKind added in v0.3.6

func (e *Entry) SetKind(kind EntryKind)

SetKind will set the kind of the entry.

func (*Entry) SetPackageSource added in v0.3.6

func (e *Entry) SetPackageSource(packageSource string)

SetPackageSource will set the package source of the entry.

type EntryKind added in v0.3.6

type EntryKind string

EntryKind is the kind of the entry. Including: 1. WithKclMod: local file which can find 'kcl.mod' in the parent dir of the file. 2. WithoutKclMod: local file which can find 'kcl.mod' in the parent dir of the file. 3. TarEntry: kcl package tar file. 4. UrlEntry: kcl package url. 5. RefEntry: kcl package ref.

func GetSourceKindFrom added in v0.3.6

func GetSourceKindFrom(source string) EntryKind

GetSourceKindFrom will return the kind of the source.

Jump to

Keyboard shortcuts

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