Giter Club home page Giter Club logo

Comments (5)

DaanDeMeyer avatar DaanDeMeyer commented on July 28, 2024

@kerneis-anssi Can you explain more about your use case? This would be rather complicated to change.

from mkosi.

kerneis-anssi avatar kerneis-anssi commented on July 28, 2024

My workflow involved pulling build dependencies locally during prepare so that I can avoid network access during build. For instance, in Go I'd use go mod vendor and in Rust cargo vendor.

I have alternative ways to reach the same goal:

  • move this step to the sync phase
  • move those downloads out of build sources (not all build systems handle this gracefully, but cargo allows out-of-tree vendored dependencies, and go mod download to populate the cache is an alternative to vendoring).

I'm not strongly advocating for you to implement this feature, especially if it's too complex. I think it would be useful to clarify the documentation though.

from mkosi.

DaanDeMeyer avatar DaanDeMeyer commented on July 28, 2024

@kerneis-anssi Can't you just download these to $BUILDDIR? If it's not configurable then you can bind mount $BUILDDIR to the directory that these commands try to write to. See BuildDirectory= option.

from mkosi.

DaanDeMeyer avatar DaanDeMeyer commented on July 28, 2024

If the paths to use can be configured via environment variables I would actually be OK with setting those automatically in mkosi.

from mkosi.

kerneis-anssi avatar kerneis-anssi commented on July 28, 2024

Cargo (Rust) allows working from BUILDDIR.

Go is really annoying because it will let you download the vendored dependencies anywhere, but then you need to put them under vendor/ at the root of the package you're trying to build for them to be used. I'll try playing with a bind mount of builddir, thanks for the hint!

If the paths to use can be configured via environment variables I would actually be OK with setting those automatically in mkosi.

I don't think that would solve my current issue, but I am indeed setting GOPATH, GOCACHE and others to somewhere inside BuildDirectory. I'll think about whether it makes sense to upstream those and let you know in a separate issue.

Leaving this open as a reminder to update the doc if you agree (I'll let you close as you see fit).

from mkosi.

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.