8000 Direct linker output to temporary file · Issue #3020 · dlang/dub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Direct linker output to temporary file #3020
Open
@VPanteleev-S7

Description

@VPanteleev-S7

I've seen the following occur:

  1. I invoke Dub to build a package
  2. Dub compiles the package, then invokes the linker
  3. The process is interrupted as the linker is running, but after it started creating the output file
  4. I re-run the process
  5. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0