-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give an option to install binaries from vendored dependencies #418
Comments
I'm not sure where @mattfarina and @technosophos stand, but I view this as a major (though not necessarily bad) additional class of behavior. In the terminology of my writeup, adding this totters on the difference between having a PDM and an LPM. The biggest issue I see with it is that it's actually got nothing to do with the depgraph of the project itself, and conflating it in could create unnecessary problems. For example: say that your actual source code depends on A better design is to keep separate the dependencies for your project and any supporting binaries. That's mostly feasible, except that if you want to truly pin them, you still need to have some kind of locking in place, because it's not (yet!) safe to trust the Go ecosystem to have done that. So...there's still a need for some level of control from within your manifest, I guess. ⛅ ⛅ I need to ponder this one... |
I'd totally understand if this is judged out-of-scope, in which case I'll see about developing a complementary tool or just forking this one.
I do not see a use-case where I would want a binary and a library from a same repo but at different versions. As I said, my use-case is mostly for code generators, and it is usually important to use the same version of the lib and the generator. Right now I am using glide to vendor the repo, and a Makefile to install the bin from vendor. The only issue I would have left is that Glide does not seem to pick-up packages imported in |
It's just the next step here - say, wanting to have
Rereading the original issue, you listed linters and code generators, but I was focused on the former to the exclusion of the latter - sorry. Yes, where there is a joint binary and library, as in OTOH,
This may be the rub, more than anything else. The only reasonable general assumption glide can make is that it should follow the import graph from the current project when deciding what dependencies to bring in - and that necessarily excludes any I suspect there's probably an elegant solution here, one that covers both use cases: glide could do the static analysis to determine whether the main project and supporting binary's depgraphs should be conjoined or not. Or, even if it's explicit/not based on analysis, a simple configuration option that lets glide then take care of the rest. I think that'd probably end up being tricky to do everything sanely, though - not surprising, given that this starts bridging the gap between LPM and PDM. IMO, if you want to try for a PR, go for it - but for now, the best approach may be a complementary tool that works for at least some cases, helps map out the problem space a little more, and can then later be merged into glide once the implications are clearer. Then again, it's not up to me :) |
Other example which behaves like |
I'd really appreciate this feature too! I don't think glide needs to grok a Let me provide a workaround for the people with this issue, plus illustrate the situation I'm talking about. My app uses the
This helps ensure that goagen will generate code that targets the vendored goa that my app uses. However, it feels like Glide could make this substantially easier on me. If glide could detect which of my packages/subpackages contained a I rather suspect that @mattfarina and @technosophos feel this to be mission creep, but for the code-gen case it's really necessary. As my workaround shows, it's not mission creep for glide; the fundamentals are already built into the tool. I'm happy to work on a PR if I've got buy-in on the idea. |
@xeger idk what they think about scope creep, but the good news is, i'm probably gonna end up adding support for optionally incorporating dependencies' That won't be available to glide until #384 is in, though, and even then, glide will have to decide if/how to incorporate that option into its manifest. |
Updating to note - I didn't actually end up including support for this in sdboyer/gps#36. However, I did open a separate issue - sdboyer/gps#42 . That doesn't mention this use case explicitly (it's focused instead on facilitating e.g. |
I would also appreciate this feature! Have an application using https://github.com/mattes/migrate and now need to install the package specifically instead of being able to depend on the glide tool alone to manage dependencies. Otherwise |
I wrote a tool to install binaries from |
Hi :) ! Small feature request:
I could use something similar to what Composer does: https://getcomposer.org/doc/06-config.md#bin-dir
The ability to install binaries from vendored dependencies.
it could look something like that:
To clarify the use case, I would use this for pinpointing linters and code generators. Me and my colleagues have to use the same versions of these tools.
If I get some free time I'll see if I can make a PR implementing this, just created the issue to start the discussion.
The text was updated successfully, but these errors were encountered: