FAQ
go install will cache any packages it compiled on your local file system.
That way the next time you're compiling and you import the package it only
has to read the library file (*.a files) to get all of the data regarding
types, funcs, etc in that package. If you don't change your external
libraries often then a lot of the work will be done once and reused often.
For example: if the standard library weren't cached Go would compile much
more slowly.
On Saturday, October 25, 2014 9:33:07 AM UTC-7, rneer...@gmail.com wrote:


Hi Carlos,

I am trying to solve a problem but I would also like to fix my
understanding in the process.
Stating my understanding below with example. Please correct as needed.
Lets take a simple example of
a) 1 package named pkg1, contained in file pkg1.go
b) 1 final go program exe1.go that would be built into an exe and
imports pkg1
1. The build always rebuilds (go build exe1.go)
2. The install builds and installs incrementally if plg1.go has
changed. Works on pkg1.go (go install pkg1)
3. once packages are installed with go test -i , go build will not
rebuild exe1 unless exe1.go or installed pkg is changed.
If that is correct, I don't see a use for go test. Why not use go install
as intermediate step and then go build?
What is the difference between the 2 methods?

thanks
Neeraj
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 16 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 25, '14 at 5:00a
activeOct 26, '14 at 2:36p
posts16
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase