FAQ
So long story short, I had to rollback Arch and copied my current src, pkg
and bin folders back, and then after doing a "go run" on one of my src
files I noticed that one of the packages I edited was missing certain
functionality I added. It dawned on me that maybe I need to rebuild and
reinstall the packages because something was out of whack. But ah! not so,
sort of. Build and install both went smoothly, but same problem! It wasn't
until I modified a package file (by adding a empty space and resaving) that
install worked and my program finally compiled.

So does Go keep track of packages for modifications?

And are they installed in temp/cache directories?

I thought go only looked in GOPATH src, pkg and bin directories when doing
go run and the temp directories were for current runs.


--
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/groups/opt_out.

Search Discussions

  • Andrey mirtchovski at Jan 24, 2014 at 6:55 am
    unless something more sinister is afoot this would have happened if
    the timestamp of the built package inside pkg/ was newer than all the
    source files. unless you made sure to preserve timestamps of all the
    original files this could be the difference between copying src/ or
    pkg/ first.

    go build (and consequently install and get) don't rebuild packages
    which are older than their source files. to force that there is the -a
    option. from the docs:

        -a

        force rebuilding of packages that are already up-to-date.

    cheers,

    --
    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/groups/opt_out.
  • T0 at Jan 24, 2014 at 7:09 am

    On Friday, January 24, 2014 12:55:48 AM UTC-6, andrey mirtchovski wrote:
    unless something more sinister is afoot this would have happened if
    the timestamp of the built package inside pkg/ was newer than all the
    source files. unless you made sure to preserve timestamps of all the
    original files this could be the difference between copying src/ or
    pkg/ first.

    go build (and consequently install and get) don't rebuild packages
    which are older than their source files. to force that there is the -a
    option. from the docs:

    -a

    force rebuilding of packages that are already up-to-date.

    cheers,
    Ok that makes sense. When transferring the files over it must of screwed
    the timestamps up. I will just use the -a flag next time I run into this
    problem. Thanks.

    --
    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/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 24, '14 at 6:50a
activeJan 24, '14 at 7:09a
posts3
users2
websitegolang.org

2 users in discussion

T0: 2 posts Andrey mirtchovski: 1 post

People

Translate

site design / logo © 2022 Grokbase