You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/10/11 16:21:08 UTC

[GitHub] [skywalking-eyes] mrproliu opened a new pull request #78: Support display `version` property for dependency resolve

mrproliu opened a new pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78


   1. Support display `version` property for `dependency resolve` command.
   2. Using `go mod download -json` to list all packages, `go list` can't list cached package `Dir` property. 
   
   Support display `version` property resolvers:
   - maven
   - go
   - npm


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-eyes] kezhenxu94 merged pull request #78: Support display `version` property for dependency resolve

Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-eyes] kezhenxu94 commented on a change in pull request #78: Support display `version` property for dependency resolve

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78#discussion_r726700908



##########
File path: pkg/deps/golang.go
##########
@@ -140,3 +143,11 @@ func (resolver *GoModResolver) ResolvePackageLicense(module *packages.Module, re
 func (resolver *GoModResolver) shouldStopAt(dir, moduleDir string) bool {
 	return dir == moduleDir || dir == build.Default.GOPATH
 }
+
+func (resolver *GoModResolver) resolveVersion(module *packages.Module) string {
+	version := module.Version
+	if strings.Contains(version, "-") {
+		version = version[0:strings.Index(version, "-")]
+	}
+	return version
+}

Review comment:
       Trimming `-xxxxxx` will produce many versions like `v0.0.0`, even for those that are not `v0.0.0`, I think the string after `-` is meaningful, because tags can be modified but commit hash cannot, and the `-xxxxx` contains the commit hash.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-eyes] mrproliu commented on a change in pull request #78: Support display `version` property for dependency resolve

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78#discussion_r726707389



##########
File path: pkg/deps/golang.go
##########
@@ -140,3 +143,11 @@ func (resolver *GoModResolver) ResolvePackageLicense(module *packages.Module, re
 func (resolver *GoModResolver) shouldStopAt(dir, moduleDir string) bool {
 	return dir == moduleDir || dir == build.Default.GOPATH
 }
+
+func (resolver *GoModResolver) resolveVersion(module *packages.Module) string {
+	version := module.Version
+	if strings.Contains(version, "-") {
+		version = version[0:strings.Index(version, "-")]
+	}
+	return version
+}

Review comment:
       Do you mean if the version contains `-`, we should only resolve the string after `-`? I found some cases, the version is `v3.0.0-20200615113413-eeeca48fe776`, not only `v0.0.0`, should we keep them all as version?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-eyes] mrproliu commented on a change in pull request #78: Support display `version` property for dependency resolve

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78#discussion_r726708583



##########
File path: pkg/deps/golang.go
##########
@@ -140,3 +143,11 @@ func (resolver *GoModResolver) ResolvePackageLicense(module *packages.Module, re
 func (resolver *GoModResolver) shouldStopAt(dir, moduleDir string) bool {
 	return dir == moduleDir || dir == build.Default.GOPATH
 }
+
+func (resolver *GoModResolver) resolveVersion(module *packages.Module) string {
+	version := module.Version
+	if strings.Contains(version, "-") {
+		version = version[0:strings.Index(version, "-")]
+	}
+	return version
+}

Review comment:
       fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-eyes] kezhenxu94 commented on a change in pull request #78: Support display `version` property for dependency resolve

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #78:
URL: https://github.com/apache/skywalking-eyes/pull/78#discussion_r726708015



##########
File path: pkg/deps/golang.go
##########
@@ -140,3 +143,11 @@ func (resolver *GoModResolver) ResolvePackageLicense(module *packages.Module, re
 func (resolver *GoModResolver) shouldStopAt(dir, moduleDir string) bool {
 	return dir == moduleDir || dir == build.Default.GOPATH
 }
+
+func (resolver *GoModResolver) resolveVersion(module *packages.Module) string {
+	version := module.Version
+	if strings.Contains(version, "-") {
+		version = version[0:strings.Index(version, "-")]
+	}
+	return version
+}

Review comment:
       I mean we can keep the version as is, don't need to touch the version




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org