GithubHelp home page GithubHelp logo

Comments (4)

jlubawy avatar jlubawy commented on September 22, 2024

I'll create a test case for this and take a stab at fixing it myself, but wanted to write down what I had in mind so far.

First I think we should address BuildTags since it's an easier problem, I think a solution would look something like this:

  1. Create a custom build.Context that contains user-specified fields to ignore/include files (context can be copied from build.Default). The user in #529 could have then specified mytag via a command-line flag to include files that have that specific build tag, and this could be saved into Godeps.json so it's also included in future runs.
  2. Run ImportDir using this Context and it will skip any files that don't match the build tags (as it used to). It should also skip // +build ignore flags.

It's a little more complicated for the ReleaseTags field since Godeps can be built with a version of Go other than what the project is using. I think there are two cases you would need to handle:

  1. If (GoVersion > Godep version) then log a warning since Godep might not be able to parse project dependencies, the user should then update Godep to be able to parse files that are from a newer version, or lower the version specified in Godeps.json
  2. Else if (GoVersion <= Godep version) then include all files that Godep can parse (using Default.ImportDir)

from godep.

jlubawy avatar jlubawy commented on September 22, 2024

I created a short-term fix for my problem here if anyone needs it. I added a command-line flag to ignore parser errors (errors that won't come up at build due to release tags being used).

I'd like to help on a long-term solution but it seems like it will be very easy to break existing projects that rely on build tags being ignored, so before putting in too much work I'd like to hear other people's thoughts and if they're interested. Also not clear how long Godep will be needed if official language support for vendoring is added soon.

Also worth mentioning that issue #443 is also requesting that build tag exclusions work.

from godep.

120318 avatar 120318 commented on September 22, 2024

I encountered the same problem and you use your modified version, but this does not output an error message is not a good program and look forward to officially modify.(google translate :) )

from godep.

freeformz avatar freeformz commented on September 22, 2024

I am closing this issue because the repo is going to be archived.

from godep.

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.