Open
Description
I've seen the following occur:
- I invoke Dub to build a package
- Dub compiles the package, then invokes the linker
- The process is interrupted as the linker is running, but after it started creating the output file
- I re-run the process
- Dub sees the partially-linked executable, and thinks the previous invocation succeeded, so it just copies it over from its cache.
This manifests as the program failing to run, even after rm
-ing it and re-running Dub. Deleting the package cache from ~/.dub/cache
or forcing a rebuild fixes it. Seeing as this situation can be a bit confusing, it would be nice to avoid it.
Generally, all programs should create files that might be read later by first writing to a temporary file and then rename
-ing it to the final location. Looks like ld
doesn't do this, so Dub should do it on its behalf by telling it to save the output to a Dub-managed temporary file.
Metadata
Metadata
Assignees
Labels
No labels