Skip to content

Commit

Permalink
chore: bump lib version to v0.10.0-alpha.2
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Aug 5, 2024
1 parent e870833 commit f4e4b52
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 98 deletions.
4 changes: 2 additions & 2 deletions bench_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright The KCL Authors. All rights reserved.

package kclvm
package kcl

// KCLVM_GO_API_TEST_NUM_CPU=1 go test -bench=.
// KCL_GO_API_TEST_NUM_CPU=1 go test -bench=.

import (
"os"
Expand Down
139 changes: 76 additions & 63 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import "kcl-lang.io/kcl-go"
```

Package kclvm
Package kcl

KCL Go SDK

Expand Down Expand Up @@ -94,68 +94,81 @@ x1 = Person {

## Index

- [Constants](<#constants>)
- [func FormatCode\(code interface\{\}\) \(\[\]byte, error\)](<#FormatCode>)
- [func FormatPath\(path string\) \(changedPaths \[\]string, err error\)](<#FormatPath>)
- [func GetSchemaTypeMapping\(filename string, src any, schemaName string\) \(map\[string\]\*KclType, error\)](<#GetSchemaTypeMapping>)
- [func InitKclvmPath\(kclvmRoot string\)](<#InitKclvmPath>)
- [func InitKclvmRuntime\(n int\)](<#InitKclvmRuntime>)
- [func LintPath\(paths \[\]string\) \(results \[\]string, err error\)](<#LintPath>)
- [func ListDepFiles\(workDir string, opt \*ListDepFilesOption\) \(files \[\]string, err error\)](<#ListDepFiles>)
- [func ListDownStreamFiles\(workDir string, opt \*ListDepsOptions\) \(\[\]string, error\)](<#ListDownStreamFiles>)
- [func ListUpStreamFiles\(workDir string, opt \*ListDepsOptions\) \(deps \[\]string, err error\)](<#ListUpStreamFiles>)
- [func OverrideFile\(file string, specs, importPaths \[\]string\) \(bool, error\)](<#OverrideFile>)
- [func Validate\(dataFile, schemaFile string, opts \*ValidateOptions\) \(ok bool, err error\)](<#Validate>)
- [func ValidateCode\(data, code string, opts \*ValidateOptions\) \(ok bool, err error\)](<#ValidateCode>)
- [type KCLResult](<#KCLResult>)
- [type KCLResultList](<#KCLResultList>)
- [func MustRun\(path string, opts ...Option\) \*KCLResultList](<#MustRun>)
- [func Run\(path string, opts ...Option\) \(\*KCLResultList, error\)](<#Run>)
- [func RunFiles\(paths \[\]string, opts ...Option\) \(\*KCLResultList, error\)](<#RunFiles>)
- [type KclType](<#KclType>)
- [func GetSchemaType\(filename string, src any, schemaName string\) \(\[\]\*KclType, error\)](<#GetSchemaType>)
- [type ListDepFilesOption](<#ListDepFilesOption>)
- [type ListDepsOptions](<#ListDepsOptions>)
- [type ListOptionsArgs](<#ListOptionsArgs>)
- [type ListOptionsResult](<#ListOptionsResult>)
- [func ListOptions\(args \*ListOptionsArgs\) \(\*ListOptionsResult, error\)](<#ListOptions>)
- [type ListVariablesArgs](<#ListVariablesArgs>)
- [type ListVariablesResult](<#ListVariablesResult>)
- [func ListVariables\(args \*ListVariablesArgs\) \(\*ListVariablesResult, error\)](<#ListVariables>)
- [type LoadPackageArgs](<#LoadPackageArgs>)
- [type LoadPackageResult](<#LoadPackageResult>)
- [func LoadPackage\(args \*LoadPackageArgs\) \(\*LoadPackageResult, error\)](<#LoadPackage>)
- [type Option](<#Option>)
- [func NewOption\(\) \*Option](<#NewOption>)
- [func WithCode\(codes ...string\) Option](<#WithCode>)
- [func WithDisableNone\(disableNone bool\) Option](<#WithDisableNone>)
- [func WithExternalPkgAndPath\(name, path string\) Option](<#WithExternalPkgAndPath>)
- [func WithExternalPkgs\(externalPkgs ...string\) Option](<#WithExternalPkgs>)
- [func WithFullTypePath\(fullTypePath bool\) Option](<#WithFullTypePath>)
- [func WithIncludeSchemaTypePath\(includeSchemaTypePath bool\) Option](<#WithIncludeSchemaTypePath>)
- [func WithKFilenames\(filenames ...string\) Option](<#WithKFilenames>)
- [func WithLogger\(l io.Writer\) Option](<#WithLogger>)
- [func WithOptions\(key\_value\_list ...string\) Option](<#WithOptions>)
- [func WithOverrides\(override\_list ...string\) Option](<#WithOverrides>)
- [func WithPrintOverridesAST\(printOverridesAST bool\) Option](<#WithPrintOverridesAST>)
- [func WithSelectors\(selectors ...string\) Option](<#WithSelectors>)
- [func WithSettings\(filename string\) Option](<#WithSettings>)
- [func WithShowHidden\(showHidden bool\) Option](<#WithShowHidden>)
- [func WithSortKeys\(sortKeys bool\) Option](<#WithSortKeys>)
- [func WithWorkDir\(workDir string\) Option](<#WithWorkDir>)
- [type ParseProgramArgs](<#ParseProgramArgs>)
- [type ParseProgramResult](<#ParseProgramResult>)
- [func ParseProgram\(args \*ParseProgramArgs\) \(\*ParseProgramResult, error\)](<#ParseProgram>)
- [type TestCaseInfo](<#TestCaseInfo>)
- [type TestOptions](<#TestOptions>)
- [type TestResult](<#TestResult>)
- [func Test\(testOpts \*TestOptions, opts ...Option\) \(TestResult, error\)](<#Test>)
- [type UpdateDependenciesArgs](<#UpdateDependenciesArgs>)
- [type UpdateDependenciesResult](<#UpdateDependenciesResult>)
- [func UpdateDependencies\(args \*UpdateDependenciesArgs\) \(\*UpdateDependenciesResult, error\)](<#UpdateDependencies>)
- [type ValidateOptions](<#ValidateOptions>)
- [type VersionResult](<#VersionResult>)
- [func GetVersion\(\) \(\*VersionResult, error\)](<#GetVersion>)
- [kclvm](#kclvm)
- [Index](#index)
- [Constants](#constants)
- [func FormatCode](#func-formatcode)
- [Output](#output)
- [func FormatPath](#func-formatpath)
- [func GetSchemaTypeMapping](#func-getschematypemapping)
- [func InitKclvmPath](#func-initkclvmpath)
- [func InitKclvmRuntime](#func-initkclvmruntime)
- [func LintPath](#func-lintpath)
- [Output](#output-1)
- [func ListDepFiles](#func-listdepfiles)
- [func ListDownStreamFiles](#func-listdownstreamfiles)
- [func ListUpStreamFiles](#func-listupstreamfiles)
- [func OverrideFile](#func-overridefile)
- [func Validate](#func-validate)
- [func ValidateCode](#func-validatecode)
- [type KCLResult](#type-kclresult)
- [Output](#output-2)
- [Output](#output-3)
- [type KCLResultList](#type-kclresultlist)
- [func MustRun](#func-mustrun)
- [Output](#output-4)
- [Output](#output-5)
- [Output](#output-6)
- [func Run](#func-run)
- [func RunFiles](#func-runfiles)
- [type KclType](#type-kcltype)
- [func GetSchemaType](#func-getschematype)
- [type ListDepFilesOption](#type-listdepfilesoption)
- [type ListDepsOptions](#type-listdepsoptions)
- [type ListOptionsArgs](#type-listoptionsargs)
- [type ListOptionsResult](#type-listoptionsresult)
- [func ListOptions](#func-listoptions)
- [Output](#output-7)
- [type ListVariablesArgs](#type-listvariablesargs)
- [type ListVariablesResult](#type-listvariablesresult)
- [func ListVariables](#func-listvariables)
- [Output](#output-8)
- [type LoadPackageArgs](#type-loadpackageargs)
- [type LoadPackageResult](#type-loadpackageresult)
- [func LoadPackage](#func-loadpackage)
- [type Option](#type-option)
- [func NewOption](#func-newoption)
- [func WithCode](#func-withcode)
- [func WithDisableNone](#func-withdisablenone)
- [func WithExternalPkgAndPath](#func-withexternalpkgandpath)
- [func WithExternalPkgs](#func-withexternalpkgs)
- [func WithFullTypePath](#func-withfulltypepath)
- [func WithIncludeSchemaTypePath](#func-withincludeschematypepath)
- [func WithKFilenames](#func-withkfilenames)
- [func WithLogger](#func-withlogger)
- [func WithOptions](#func-withoptions)
- [Output](#output-9)
- [func WithOverrides](#func-withoverrides)
- [func WithPrintOverridesAST](#func-withprintoverridesast)
- [func WithSelectors](#func-withselectors)
- [func WithSettings](#func-withsettings)
- [func WithShowHidden](#func-withshowhidden)
- [func WithSortKeys](#func-withsortkeys)
- [func WithWorkDir](#func-withworkdir)
- [type ParseProgramArgs](#type-parseprogramargs)
- [type ParseProgramResult](#type-parseprogramresult)
- [func ParseProgram](#func-parseprogram)
- [type TestCaseInfo](#type-testcaseinfo)
- [type TestOptions](#type-testoptions)
- [type TestResult](#type-testresult)
- [func Test](#func-test)
- [type UpdateDependenciesArgs](#type-updatedependenciesargs)
- [type UpdateDependenciesResult](#type-updatedependenciesresult)
- [func UpdateDependencies](#func-updatedependencies)
- [Output](#output-10)
- [type ValidateOptions](#type-validateoptions)
- [type VersionResult](#type-versionresult)
- [func GetVersion](#func-getversion)


## Constants
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright The KCL Authors. All rights reserved.

package kclvm_test
package kcl_test

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
kcl-lang.io/lib v0.10.0-alpha.1
kcl-lang.io/lib v0.10.0-alpha.2
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
kcl-lang.io/lib v0.10.0-alpha.1 h1:GMVB75Pc1W29gcl1WlVgdgUscH6h+d9No0fzBH0rNYg=
kcl-lang.io/lib v0.10.0-alpha.1/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
kcl-lang.io/lib v0.10.0-alpha.2 h1:WWZYNbN/jpgexe4KZHFUEvKWY7LQPdN53WCFBOFKqSs=
kcl-lang.io/lib v0.10.0-alpha.2/go.mod h1:tu+tzwGgHLzYZSIxUG/ntipStrxZd6OvutWYPTxS7cs=
6 changes: 3 additions & 3 deletions kclvm.go → kcl.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2023 The KCL Authors. All rights reserved.
// Copyright The KCL Authors. All rights reserved.

// Package kclvm
// Package kcl
/*
KCL Go SDK
Expand Down Expand Up @@ -28,7 +28,7 @@ KCL Go SDK
│WithDisableNone │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
*/
package kclvm
package kcl

import (
"io"
Expand Down
4 changes: 2 additions & 2 deletions kclvm_test.go → kcl_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright The KCL Authors. All rights reserved.

package kclvm_test
package kcl_test

import (
"bytes"
Expand All @@ -21,7 +21,7 @@ import (
"kcl-lang.io/kcl-go/pkg/spec/gpyrpc"
)

const tEnvNumCpu = "KCLVM_GO_API_TEST_NUM_CPU"
const tEnvNumCpu = "KCL_GO_API_TEST_NUM_CPU"

func TestMain(m *testing.M) {
flag.Parse()
Expand Down
2 changes: 1 addition & 1 deletion kclvm_version.go → kcl_version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright The KCL Authors. All rights reserved.

package kclvm
package kcl

import "kcl-lang.io/kcl-go/scripts"

Expand Down
2 changes: 1 addition & 1 deletion pkg/service/testmain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"kcl-lang.io/kcl-go/pkg/runtime"
)

const tEnvNumCpu = "KCLVM_GO_API_TEST_NUM_CPU"
const tEnvNumCpu = "KCL_GO_API_TEST_NUM_CPU"
const tRestServerAddr = "127.0.0.1:7001"

func TestMain(m *testing.M) {
Expand Down
45 changes: 23 additions & 22 deletions scripts/kclvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,28 @@ const (
)

const (
KclvmAbiVersion KclvmVersionType = KclvmVersionType_v0_9_0
KclvmVersionType_latest = KclvmVersionType_v0_9_0
KclvmAbiVersion KclvmVersionType = KclvmVersionType_v0_10_0
KclvmVersionType_latest = KclvmVersionType_v0_10_0

KclvmVersionType_v0_9_0 KclvmVersionType = "v0.9.0"
KclvmVersionType_v0_8_0 KclvmVersionType = "v0.8.0"
KclvmVersionType_v0_7_5 KclvmVersionType = "v0.7.5"
KclvmVersionType_v0_7_4 KclvmVersionType = "v0.7.4"
KclvmVersionType_v0_7_3 KclvmVersionType = "v0.7.3"
KclvmVersionType_v0_7_2 KclvmVersionType = "v0.7.2"
KclvmVersionType_v0_7_1 KclvmVersionType = "v0.7.1"
KclvmVersionType_v0_7_0 KclvmVersionType = "v0.7.0"
KclvmVersionType_v0_6_0 KclvmVersionType = "v0.6.0"
KclvmVersionType_v0_5_6 KclvmVersionType = "v0.5.6"
KclvmVersionType_v0_5_5 KclvmVersionType = "v0.5.5"
KclvmVersionType_v0_5_4 KclvmVersionType = "v0.5.4"
KclvmVersionType_v0_5_3 KclvmVersionType = "v0.5.3"
KclvmVersionType_v0_5_2 KclvmVersionType = "v0.5.2"
KclvmVersionType_v0_5_1 KclvmVersionType = "v0.5.1"
KclvmVersionType_v0_5_0 KclvmVersionType = "v0.5.0"
KclvmVersionType_v0_4_6 KclvmVersionType = "v0.4.6"
KclvmVersionType_v0_4_5 KclvmVersionType = "v0.4.5"
KclvmVersionType_v0_4_4 KclvmVersionType = "v0.4.4"
KclvmVersionType_v0_4_3 KclvmVersionType = "v0.4.3"
KclvmVersionType_v0_10_0 KclvmVersionType = "v0.10.0"
KclvmVersionType_v0_9_0 KclvmVersionType = "v0.9.0"
KclvmVersionType_v0_8_0 KclvmVersionType = "v0.8.0"
KclvmVersionType_v0_7_5 KclvmVersionType = "v0.7.5"
KclvmVersionType_v0_7_4 KclvmVersionType = "v0.7.4"
KclvmVersionType_v0_7_3 KclvmVersionType = "v0.7.3"
KclvmVersionType_v0_7_2 KclvmVersionType = "v0.7.2"
KclvmVersionType_v0_7_1 KclvmVersionType = "v0.7.1"
KclvmVersionType_v0_7_0 KclvmVersionType = "v0.7.0"
KclvmVersionType_v0_6_0 KclvmVersionType = "v0.6.0"
KclvmVersionType_v0_5_6 KclvmVersionType = "v0.5.6"
KclvmVersionType_v0_5_5 KclvmVersionType = "v0.5.5"
KclvmVersionType_v0_5_4 KclvmVersionType = "v0.5.4"
KclvmVersionType_v0_5_3 KclvmVersionType = "v0.5.3"
KclvmVersionType_v0_5_2 KclvmVersionType = "v0.5.2"
KclvmVersionType_v0_5_1 KclvmVersionType = "v0.5.1"
KclvmVersionType_v0_5_0 KclvmVersionType = "v0.5.0"
KclvmVersionType_v0_4_6 KclvmVersionType = "v0.4.6"
KclvmVersionType_v0_4_5 KclvmVersionType = "v0.4.5"
KclvmVersionType_v0_4_4 KclvmVersionType = "v0.4.4"
KclvmVersionType_v0_4_3 KclvmVersionType = "v0.4.3"
)

0 comments on commit f4e4b52

Please sign in to comment.