Comments (7)
This SGTM
from dep.
i'm glad you like that behavior, b/c it's the simplest way of making this work :)
the only thing about it is, if you ensure w/out it being imported it's not in the lock OR vendor. or anywhere in your GOPATH. so it doesn't actually help with goimports/code completion.
there's one other easy possibility i've thought of, here - we could inject the named package with a require
into the manifest we pass to Solve(), but NOT into the manifest on disk. that way the proj make it into the lock and vendor, enabling code completion. on a subsequent ensure
, if the user still hasn't added an actual import for that project, it'll disappear from the lock and vendor. sdboyer/gps#42
idk which of these causes more WTF.
from dep.
so basically I'm going to write a test ensuring (hahaha pun) we never break this behavior, then I will close this
from dep.
except I kinda want the behavior @sdboyer mentioned as:
we could inject the named package with a require into the manifest we pass to Solve(), but NOT into the manifest on disk. that way the proj make it into the lock and vendor, enabling code completion. on a subsequent ensure, if the user still hasn't added an actual import for that project, it'll disappear from the lock and vendor
from dep.
so actually I think it should possibly behave like this:
$ dep ensure github.com/Sirupsen/[email protected]
# warn: you have requested github.com/Sirupsen/logrus but it is not imported in your code
# run dep ensure --require github.com/Sirupsen/[email protected] to add it to the vendor and lock
or something like that
from dep.
cool! @jessfraz i was imagining this, a small tweak on what you had:
$ dep ensure github.com/Sirupsen/[email protected]
# warn: you have requested github.com/Sirupsen/logrus but it is not imported in your code.
# It will be added to lock and vendor now, but removed if dep ensure is run again without importing it.
# run dep ensure --require github.com/Sirupsen/[email protected] to guarantee it is always present in lock and vendor, regardless of whether your code imports it.
from dep.
Closing this out, as I think the new direction defined in #213 obviates it.
from dep.
Related Issues (20)
- aws-go-dep How To Get Params? HOT 1
- gps/constraint.go:149:4: undefined: semver.Constraint HOT 5
- ignore commented imports HOT 1
- NetBSD support HOT 1
- dep init failed - ubuntu machine HOT 1
- dep ensure ignore version for required project HOT 1
- primary readme has bad link for windows tarball named " HOT 2
- dep ensure failed with `lock and vendor: failed to export` HOT 2
- Dep ensure creates thousands of lock files running out of file handles HOT 2
- Installation failure using install.sh in MacOS HOT 1
- clear
- Unable to install iris using dep HOT 2
- dep init in WSL HOT 1
- error: failed to format output: consume [attachment]: unable to process attachment: can't read attachment of length 0
- Link to windows tarball is no longer valid HOT 4
- Issue in constraint.go HOT 7
- Sounds fantastic @julieqiu and it's really awesome how much the feedback is being taken into account on this. HOT 1
- Unable to connect to go.googlesource.com - connection refused, and network is unreachable HOT 1
- init failed: unable to determine direct dependencies: unable to deduce repository and source type for "go.dedis.ch/fixbuf": unable to read metadata: go-import metadata not found HOT 1
- Unable to connect to go.googlesource.com - connection refused and network is unreachable 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 dep.