-
Notifications
You must be signed in to change notification settings - Fork 22
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
Pull-first #63
Comments
Are you talking about a Possible reasons not to pull automatically are that it's something that can fail (and needs additional complexity to handle that), something that takes extra time, something that Pkg usually tends to do frequently anyway, or something that's not really LocalRegistry's business. But I'd need to understand the use case better to analyze how significant those objections are compared to the value of doing it. |
Sure. So I'm working on packages that are included in a private registry. Usually they're consumed remotely and produced locally. I also work on multiple computers, so if I register a package on one computer, and then try to register a package on another computer, I get an error that the local copy is behind the remote copy and so it can't complete the operation. So I have to go manually pull from the remote copy of the registry and try again. It always succeeds without issue. |
I assume you're registering against an installed registry using the no-argument
without leaving Julia. Usually Pkg tends to update the registries automatically when you do certain other operations, but maybe your workflow doesn't trigger that. Anyhow, I'm open to pulling the remote if the need to do so can be detected cheaply enough. |
Glad to have a workaround! Yeah, guess my usage is a bit of an edge case. |
Not such an edge case, we have been running into this a lot in our team as well. Our workflow is almost identical to BioTurboNick's. Would it be too difficult to add an option to update registry in the |
I just hit the same thing and ended up in merge conflicts. I think that fetching/pull (maybe even rebasing) would be a good idea 😉 |
Automatic rebasing is out of the question. Defaulting to making a temporary git clone could be an option, or having an explicit way to opt in to that. Cf. https://github.com/GunnarFarneback/LocalRegistry.jl/blob/master/src/LocalRegistry.jl#L152-L155 |
I think I was not clear enough with the "rebasing". What I meant was that if Anyways, I start to believe that this is probably a bit too much for these rare cases. 😄 |
Instructing people to try |
Unless there's a conflict, is there any reason not to pull the remote copy of the registry first if the local copy is not synced with it?
Would be nice to not have to manually pull when trying to register a package on a different machine.
The text was updated successfully, but these errors were encountered: