Skip to content

Commit

Permalink
Merge pull request #73 from Peefy/fix-entry-with-pkg-deps
Browse files Browse the repository at this point in the history
fix: entry with pkg alias
  • Loading branch information
Peefy authored Apr 30, 2024
2 parents 866202d + cad0e19 commit d1a9d3b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.6
0.8.7
13 changes: 11 additions & 2 deletions pkg/options/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,22 @@ func (o *RunOptions) Run() error {
opts.SetPkgPath(pwd)
result, err = cli.CompileWithOpts(opts)
} else {
// If there is only kcl file without kcl package (kcl.mod)
// TODO: refactor the entry search logic.
depsOpt, depErr := LoadDepsFrom(pwd, o.Quiet)
if depErr != nil {
return err
}
opts.Merge(*depsOpt)
result, err = api.RunWithOpt(opts)
}
} else {
// kcl compiles the package from the local file system, tar and OCI package, etc.
if entry.IsLocalFile() {
// If there is only kcl file without kcl package (kcl.mod)
depsOpt, depErr := LoadDepsFrom(pwd, o.Quiet)
if depErr != nil {
return err
}
opts.Merge(*depsOpt)
result, err = api.RunWithOpt(opts)
} else if entry.IsLocalFileWithKclMod() {
// Else compile the kcl package (kcl.mod)
Expand Down
5 changes: 3 additions & 2 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ func getVersion(version string) string {
}

const (
VersionTypeLatest = Version_0_8_6
VersionTypeLatest = Version_0_8_7

Version_0_8_6 VersionType = "0.8.6"
Version_0_8_7 VersionType = "0.8.7"
Version_0_8_6 VersionType = "0.8.7"
Version_0_8_5 VersionType = "0.8.5"
Version_0_8_4 VersionType = "0.8.4"
Version_0_8_3 VersionType = "0.8.3"
Expand Down

0 comments on commit d1a9d3b

Please sign in to comment.