-
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
glide -> gps transition #565
Comments
@sdboyer going to start asking some questions as I dig through these. Here's a start:
|
Yes, there's considerably more (Masterminds/vcs detection isn't used at all). It's wrapped up in a larger system, contained within the There's a lot of logic here, all there for considered reasons, but not all necessarily germane to the question of a If I have a clear view on what that use case is, then I can figure out where it's appropriate to incorporate that control.
Yep, there's a checkbox for this on #384 right now, and it's my currently in-progress code on my local. Basically, my approach is to have structs for the new version of the manifest and lock files, and structs for the old version.
There are three answers to this: "No", "Yes," and "I'd like to but it's hard. All are true, depending on the specific constraints. The "Yes" is because it's possible for the root project to indicate an override, which unilaterally chooses the location from which to source C. It could be what A says, or what B says, or something else entirely. This is a workable solution that gives the user the control they need to proceed with their own work, but it's not a scalable or healthy solution, because:
The "No" refers to the general case: given that "one import path, one package" is (at least for now) a requirement of the system, if A and B indicate that C should be sourced from a different location/URL, that is, at base, an irreconcilable conflict. There may be ways we can squirrel around that, but that brings us to... "I'd like to, but it's hard"; while there are a bunch of strategies we could use to make this work in some common cases, they involve doing some acrobatics, and I want to tease out the specific constraints of those cases more before investing the necessary time. For example, in the use case you gave, I think the ideal solution would be that if we treated A's request for the canonical C as a 'default', which could later be superceded by B's request for sourcing C from a fork, then that might work well. However, with the way the solver is currently designed, depending on ordering, things could look different:
So, yeah - we have at least a short-term solution, but more use case exploration and refinement is needed. |
How would you handle a location on the filesystem? People use those right now for a handful of things. I didn't consider the |
As in the mirroring idea implemented in #547? Or as in "there's code, but no vcs to manipulate, at My answers are quite different, depending on which one you're curious about. |
@sdboyer I have a hard time thinking I could go to the Glide power users, such as @akutz, and tell them that in What would you suggest telling these folks that they would accept? |
...?? I don't understand why you wrote this. The question I asked was, "are you referring to the mirrors feature you just shipped, or to this other thing?" You responded with, "mirrors are an important feature, how do I tell people they don't get them?" Could you please answer the question I ask, particularly when it's a straight up either/or? Or, if it's not clear what I'm talking about (which I know happens often, and I'm sorry), ask for a clarification? In any case, I take it that you want to discuss mirrors, not the other thing. I didn't say that mirrors are something gps can't/won't support. Not at all. I was only referring to that |
@sdboyer I have some questions/comments...
I keep running into trouble when I go to try it. Can you give me some pointers to help get up to speed more quickly? |
(I've pushed a commit that should fix this panic: It's indeed possible that the panic with Helm there may be tied to issues with gopkg.in - I'll have to investigate more later. I've just opened up sdboyer/gps#97, which is about pre-filtering acceptable versions based on what the import path looks like - effectively, respecting gopkg.in's semantics. As much as that's possible, anyway.
I actually wasn't looking at glide when I wrote it. It's based on simple string replacement - https://github.com/sdboyer/gps/blob/master/source_manager.go#L17, which is run on the results of as the TODO notes, i'm not the happiest with it. looking at output, though, it seems to look like packagist's (while glide's looks a bit more like npm's).
So, there's a few pieces, here. First is the background context - whenever we talk about version selection, defaults, etc. in gps, we're ultimately talking about the relative order of versions inside a queue. The order of versions in that queue is the order in which we "try" a version. "Trying" means checking it against version constraints (among other things), so it's not a problem if the correct version to pick isn't first in the queue - only that it's the first in the queue that satisfies constraints. The way these queues get populated is a little complicated, but in the general case, gps uses this sort ordering on the set of versions returned from interrogating the vcs. That means, absent any constraint information, semver will always be tried first, then plain tags, then branches. Now, the tool is in full control of the constraints that are used, so glide could effectively alter that behavior to prefer branches: whenever returning a manifest (whether for the root or a dep), if glide sees there's no constraint declared, it could put in a That said, I'd like to suggest that it might be better for glide to prefer selecting a semver tag if one is available, and if not, then taking the default branch. That seems to me to be the world we want to nudge towards. (For that, I'd need to do sdboyer/gps#65 and sdboyer/gps#98) |
sdboyer/gps#65 and sdboyer/gps#98 are now complete. I've rolled v0.11.0 now, after pushing back a couple of the things that were in it to v0.12.0. The only thing that's of immediate relevance here that I bumped is the the pre-filtering of available versions from gopkg.in ticket, sdboyer/gps#97. There's a couple API changes in v0.11.0 that I'll need to resync into #384 before it'll work. Nothing huge, though. |
Is there anything that I could pick up to help with this effort? I don't have a huge amount of time to dedicate to it, but if there was something I've got a chance of writing a reasonable PR for I'd be up for it. |
@silasdavis sorry, i've been very swamped this week - but i'm thrilled that you're interested in helping! i'll try to find a bite-size chunk for you over the weekend. |
@sdboyer bump (though no rush - I'm not going anywhere) |
@silasdavis thanks for the bump. sorry, my work in this general domain has been really focused towards the new official tooling, gps, and semver - between that and the holidays, it's been hard to find time for glide directly. The most useful thing to start with would be building glide from the |
@sdboyer perhaps you could use me on gps? |
@silasdavis i most surely could :) i'm not sure that i can promise any particularly low-hanging fruit issues, but here's a starting list:
|
As discussed in #384, there's a number of things to consider about transitioning glide onto gps. I figured I'd open this issue as a place to start just enumerating them, and we can decide where/how to split them all out later.
I intend to edit and update this list as I go, though, so probably better to think of this as a meta-TODO list, where we can check things off as we talk through them and agree on something, implement something, or whatever other solution we come to.
(This list is unlikely to be exhaustive until everything's actually checked, as it's a running checklist that I'll add to as we discover more things)
gps doesn't currently support that (Express set of packages actually used in result/lock sdboyer/gps#40), but adding support is pretty trivial (we have all the information).glide.yaml
key is changed: s/Import
/Dependencies
/. It might be even more semantically accurate if it wereDependencyConstraints
orConstraints
ignore
andexclude
inglide.yaml
could both just be folded into gps' ignore, but I'm not fully sure.glide get
, b/c it's kinda a no-op if it's not in the import graph - apart from updating the manifest. As described in gps issue, though, I think we could maybe safely defer that till later?glide.yaml
, but is not present in the import graph, it will NOT show up in the result.The text was updated successfully, but these errors were encountered: