Comments (4)
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:
- Create a custom
build.Context
that contains user-specified fields to ignore/include files (context can be copied frombuild.Default
). The user in #529 could have then specifiedmytag
via a command-line flag to include files that have that specific build tag, and this could be saved intoGodeps.json
so it's also included in future runs. - Run
ImportDir
using thisContext
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:
- 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
- Else if (GoVersion <= Godep version) then include all files that Godep can parse (using
Default.ImportDir
)
from godep.
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.
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.
I am closing this issue because the repo is going to be archived.
from godep.
Related Issues (20)
- Command not found: 'godep'
- No command 'godep' found HOT 2
- update vendored deps to latest remote version HOT 1
- Add banner to README with link to golang/dep HOT 2
- Question about commit the vendor directory HOT 2
- sdgfc 4qswczeswdzx HOT 1
- sdgfc 4qswczeswdzxF HOT 1
- so many errors!!! HOT 1
- Godep should use go env for missing ENV variables HOT 1
- - HOT 1
- Backward compatible removal of package in dependency can cause godep save error: "no buildable Go source files in <pkg>" HOT 1
- godep does not see vendored packages within thirdpadrty dependencies HOT 1
- dep ensure hangs if ssh key has a passphrase
- Consistent way to reference Gopkg.toml in CLI HOT 1
- Can the specified directory be excluded when `godep save`
- Changed git provider. Most vendor packages are still using the old git link
- Build failed after godep save HOT 1
- i used gin, gin used +build HOT 2
- vert toml to json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godep.