Repository navigation
rustpkg: Make checked-out source files read-only, and overhaul where temporary files are stored - #9732
rustpkg: Make checked-out source files read-only, and overhaul where temporary files are stored#9732catamorphism wants to merge 1 commit into
Conversation
|
How does rustpkg allow sources of dependencies to be updated? What happens when they are read only and need to be updated? |
|
@brson That's a good question, and I should add a test for that situation. I would rather land this PR first, though. 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 [1] However, if there's no network connection available, it should continue gracefully, perhaps printing a warning. |
…temporary files are stored rustpkg now makes source files that it checks out automatically read-only, and stores them under build/. Also, refactored the `PkgSrc` type to keep track of separate source and destination workspaces, as well as to have a `build_workspace` method that returns the workspace to put temporary files in (usually the source, sometimes the destination -- see comments for more details). Closes rust-lang#6480
r? @metajack rustpkg now makes source files that it checks out automatically read-only, and stores them under build/. Also, refactored the `PkgSrc` type to keep track of separate source and destination workspaces, as well as to have a `build_workspace` method that returns the workspace to put temporary files in (usually the source, sometimes the destination -- see comments for more details). Closes #6480
9732: feat: gate custom clint-side commands behind capabilities r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
r? @metajack rustpkg now makes source files that it checks out automatically read-only, and stores
them under build/.
Also, refactored the
PkgSrctype to keep track of separate source and destinationworkspaces, as well as to have a
build_workspacemethod that returns the workspaceto put temporary files in (usually the source, sometimes the destination -- see
comments for more details).
Closes #6480