Difference between revisions of "Talk:Go package guidelines"

From ArchWiki
Jump to: navigation, search
m (Blackx moved page Talk:Go Package Guidelines to Talk:Go package guidelines: renamed for consistency with other package guidelines (also titles should use sentence case, see Help:Style#Title))
(GOPATH has been removed from /etc/profile.d/go.sh)
 
Line 5: Line 5:
 
In either case, $GOPATH is not reset after sourcing /etc/profile.d/go.sh, so src ends up in $srcdir.
 
In either case, $GOPATH is not reset after sourcing /etc/profile.d/go.sh, so src ends up in $srcdir.
 
[[User:Vulpesvelox|Vulpesvelox]] ([[User talk:Vulpesvelox|talk]]) 10:44, 24 January 2014 (UTC)
 
[[User:Vulpesvelox|Vulpesvelox]] ([[User talk:Vulpesvelox|talk]]) 10:44, 24 January 2014 (UTC)
 +
 +
==Use of GOPATH==
 +
 +
In the {{ic|check()}} function of the sample PKGBUILD using {{ic|go get}}, the GOPATH is set to {{ic|"$GOPATH:$srcdir"}}. This fails if GOPATH is empty.
 +
Beside, I don't see the point of setting this to a possibly existing $GOPATH when the code.
 +
I think PKGBUILDs should ''not'' rely on the the user's repository, that is, it should be sandboxed. If the users already have a repo, they probably don't need the PKGBUILD in the first place.
 +
All they need is run {{ic|go get -u blah/blah}} and same for testing.
 +
What do you think?
 +
-- [[User:Ambrevar|Ambrevar]] ([[User talk:Ambrevar|talk]]) 07:39, 1 May 2016 (UTC)

Latest revision as of 07:39, 1 May 2016

GOPATH has been removed from /etc/profile.d/go.sh

/etc/profile.d/go.sh since go 1.2-1 doesn't contain GOPATH and breaks PKGBUILD templates. https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/go&id=fa3a43875223f38c577093e2b6dc14c604a78b08 I really don't know if /usr/lib/go/src is the right place for sources or they should go to /usr/lib/go/site/src. In either case, $GOPATH is not reset after sourcing /etc/profile.d/go.sh, so src ends up in $srcdir. Vulpesvelox (talk) 10:44, 24 January 2014 (UTC)

Use of GOPATH

In the check() function of the sample PKGBUILD using go get, the GOPATH is set to "$GOPATH:$srcdir". This fails if GOPATH is empty. Beside, I don't see the point of setting this to a possibly existing $GOPATH when the code. I think PKGBUILDs should not rely on the the user's repository, that is, it should be sandboxed. If the users already have a repo, they probably don't need the PKGBUILD in the first place. All they need is run go get -u blah/blah and same for testing. What do you think? -- Ambrevar (talk) 07:39, 1 May 2016 (UTC)