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/12 01:55:18 UTC

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

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