You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On #9732, @brson asked: "How does rustpkg allow sources of dependencies to be updated? What happens when they are read only and need to be updated?"
and I replied:
"What I think will happen right now is that rustpkg will never update sources once they're checked out. That's obviously not the desired behavior.
What I think should happen is that rustpkg should always check for upstream changes unless a specific revision was requested [1]. If there are new changes, it should fetch them into a temporary directory, then force-rm the old checked-out sources [2] and move the temporary directory into the existing directory if everything succeeded.
This is hard to test for the same reason that we don't have tests for anything that makes network requests from a git server.
An alternative is to add a "rustpkg freshen" (or something) command that updates any git sources that are known about. Or, a --update flag that goes with build and install. Personally I'd rather not add more flags, though.
[1] However, if there's no network connection available, it should continue gracefully, perhaps printing a warning.
[2] To protect people against data loss if they accidentally made the files writable and made their own changes, perhaps it could also error out at this point if the existing files that are supposed to be read-only aren't?"
We should decide what to do; then do it.
The text was updated successfully, but these errors were encountered:
On #9732, @brson asked: "How does rustpkg allow sources of dependencies to be updated? What happens when they are read only and need to be updated?"
and I replied:
"What I think will happen right now is that rustpkg will never update sources once they're checked out. That's obviously not the desired behavior.
What I think should happen is that rustpkg should always check for upstream changes unless a specific revision was requested [1]. If there are new changes, it should fetch them into a temporary directory, then force-rm the old checked-out sources [2] and move the temporary directory into the existing directory if everything succeeded.
This is hard to test for the same reason that we don't have tests for anything that makes network requests from a git server.
An alternative is to add a "rustpkg freshen" (or something) command that updates any git sources that are known about. Or, a --update flag that goes with build and install. Personally I'd rather not add more flags, though.
[1] However, if there's no network connection available, it should continue gracefully, perhaps printing a warning.
[2] To protect people against data loss if they accidentally made the files writable and made their own changes, perhaps it could also error out at this point if the existing files that are supposed to be read-only aren't?"
We should decide what to do; then do it.
The text was updated successfully, but these errors were encountered: