Skip to content

Commit

Permalink
Merge pull request #483 from kcl-lang/fix-circular-dep
Browse files Browse the repository at this point in the history
fix: fix a bug when check cyclic dependeny
  • Loading branch information
Peefy authored Sep 14, 2024
2 parents 31d2c0f + 5ea3895 commit dc97867
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1895,12 +1895,16 @@ func (c *KpmClient) DownloadDeps(deps *pkg.Dependencies, lockDeps *pkg.Dependenc
var err error
var deppkg *pkg.KclPkg
if len(d.LocalFullPath) != 0 {
deppkg, err = c.LoadPkgFromPath(d.LocalFullPath)
if d.GetPackage() != "" {
d.LocalFullPath, _ = utils.FindPackage(d.LocalFullPath, d.GetPackage())
}
} else {
// Load kcl.mod file of the new downloaded dependencies.
deppkg, err = c.LoadPkgFromPath(filepath.Join(c.homePath, d.FullName))

if d.GetPackage() != "" {
d.LocalFullPath, _ = utils.FindPackage(filepath.Join(c.homePath, d.FullName), d.GetPackage())
}
}
deppkg, err = c.LoadPkgFromPath(d.LocalFullPath)
if err != nil {
if os.IsNotExist(err) {
continue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[dependencies]
[dependencies.cc]
name = "cc"
full_name = "flask-demo-kcl-manifests_8308200"
full_name = "flask_manifests_0.0.1"
version = "0.0.1"
url = "https://github.com/kcl-lang/flask-demo-kcl-manifests.git"
commit = "8308200"
Expand Down

0 comments on commit dc97867

Please sign in to comment.