Code Monkey home page Code Monkey logo

Comments (5)

yangyanqing avatar yangyanqing commented on August 11, 2024 1

Does it duplicate with #26 ?

from gaia.

alessio avatar alessio commented on August 11, 2024 1

@yangyanqing another C fella here ;-)

The Go compiler works in a different way than C compilers - build artifacts are cached and reused by default in future builds, unless cache is turned off explicitly by setting GOCACHE=off in the environment. You may find out where the compiler caches objects by typing go env GOCACHE.

Since the adoption of go modules, turning the cache off causes the build to fail:

$ GOCACHE=off make install
go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.ServerName=gaiad -X github.com/cosmos/cosmos-sdk/version.ClientName=gaiacli -X github.com/cosmos/cosmos-sdk/version.Version=0.0.0-15-g787bd94 -X github.com/cosmos/cosmos-sdk/version.Commit=787bd94b3134ba334e1162afcf77bbe8dcf66644 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"' ./cmd/gaiad
build cache is disabled by GOCACHE=off, but required as of Go 1.12
Makefile:84: recipe for target 'install' failed
make: *** [install] Error 1

If you want to make sure to recompile all build artifacts, you first need to call go clean -cache.

from gaia.

alessio avatar alessio commented on August 11, 2024

I know how to do this - it's more a question of how needed this is cause a mitigation is in place:

make clean build

This way you can make sure you recompile everything

from gaia.

yangyanqing avatar yangyanqing commented on August 11, 2024

I was a C engineer for more than 8 years. C project will compile each .c to .obj, and link them to executable file. There are tens of millions of lines of code in my project. When I modify a single file, make can find it accurately. Compiling can finish in one minute. But if I clean all target, I have to wait for more than 40 minutes.

I cannot find some intermediate file like obj in go build system. So maybe make clean build and make build will spend the same time. If the project grow grow to a larger scale, compile time will be longer and longer.

from gaia.

alessio avatar alessio commented on August 11, 2024

Thank you for taking the time to file this report and helping to make gaia better. I'm closing it as it does not seem to be causing significant problems for now.

from gaia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.