GithubHelp home page GithubHelp logo

Comments (6)

vaastav avatar vaastav commented on June 9, 2024

Is the "std" package even defined anywhere? I don't see it in the repository.

EDIT: Wait, is this loading the golang std package? I am not sure we need to load that at all.

from blueprint.

vaastav avatar vaastav commented on June 9, 2024

In GitLab by @JonathanMace on Sep 16, 2023, 05:06

It's used when parsing gocode. Need to know if an import is a built in package like context, or if it is a dependency that needs to be added to the go.mod.

from blueprint.

vaastav avatar vaastav commented on June 9, 2024

Running go build after the workspace generation will automatically take care of this as that command would modify the go.mod file properly if it has external dependencies.

from blueprint.

vaastav avatar vaastav commented on June 9, 2024

In GitLab by @JonathanMace on Sep 18, 2023, 20:01

OK, that's good. I just checked and it seems like go mod tidy is the command that will update the go.mod file, not go build.

It means there is some unnecessary logic in the v2 compiler that explicitly tracks module dependencies for the go.mod file of generated modules (e.g. see plugins/golang/gogen/modulebuilder.go. Some of this won't be necessary if go mod tidy will do it for us implicitly.

We will still need to handle unpublished modules explicitly, since go mod tidy won't find them; currently the workspace generator updates the go.mod of all output modules to add replace directives to the appropriate output directory, e.g.

require require gitlab.mpi-sws.org/cld/blueprint/examples/leaf/workflow v0.0.0
replace gitlab.mpi-sws.org/cld/blueprint/examples/leaf/workflow v0.0.0 => ../workflow

The workspace generator currently has logic that pretty much covers this use case -- after we're done generating and collecting modules to the output, it will rewrite all go.mod files to add replace directives to dependencies that exist in the output.

from blueprint.

vaastav avatar vaastav commented on June 9, 2024

In GitLab by @JonathanMace on Sep 18, 2023, 20:18

Opened #26 to deal with this. As a result of #26 we can remove the Builtin type and simplify Usertype to only have the package name and not the module name. Closing #6.

from blueprint.

vaastav avatar vaastav commented on June 9, 2024

Yes, go mod tidy will fix this as well. When you do go build, it automatically checks for the dependencies and downloads the various modules needed.

from blueprint.

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.