Skip to content

Ability to generate hard links when Build.LinkGeneratedSources is false #3513

Description

@Dimagog

Scenario is simple:

  • Build.LinkGeneratedSources is false (or missing) in config
  • I run plz generate
  • I want it to generate hard links
  • I don’t want plz build to generate any links at all

Currently generation of hard links is only possible when Build.LinkGeneratedSources is set to hard. But if I don’t want links generated during plz build, and I want hard links generated by plz generate, then I’m out of luck.

Why it’s important: soft links do not interrop with WSL on Windows.

Activity

  1. Dimagog commented on Mar 29, 2026

    @Dimagog
    Author

    Arguably the fix could be as simple as checking value of another config variable in this line

    if state.Config.Build.LinkGeneratedSources == "hard" {

  2. toastwaffle commented on Mar 30, 2026

    @toastwaffle
    Contributor

    I agree with what you propose, but we don't have time to make this change. I'll happily review a PR though.

  3. Dimagog commented on Mar 30, 2026

    @Dimagog
    Author

    Please come up with the setting name that you like and I’ll make the change.

  4. toastwaffle commented on Mar 31, 2026

    @toastwaffle
    Contributor

    Let's be verbose and explicit, and have LinkGeneratedSourcesOnBuild (boolean) and GeneratedSourcesLinkType (string, soft or hard, defaults to soft).

    For now let's keep the LinkGeneratedSources field, but we should mark it as deprecated (and we can consider removing it in a future major release)

  5. Dimagog commented on Apr 2, 2026

    @Dimagog
    Author

    PR: #3516

  6. Dimagog commented on Apr 8, 2026

    @Dimagog
    Author

    @toastwaffle please take a look at PR above. It's not very small, but trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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