Skip to content

fix(link): use overwrite=true in upgrade/reinstall and surface conflicts#26

Merged
jhult merged 1 commit into
neul-labs:mainfrom
jhult:fix/links
Jun 30, 2026
Merged

fix(link): use overwrite=true in upgrade/reinstall and surface conflicts#26
jhult merged 1 commit into
neul-labs:mainfrom
jhult:fix/links

Conversation

@jhult

@jhult jhult commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

stout upgrade (and stout reinstall) called link_package with overwrite=false. When a cross-package symlink conflict existed, the conflicting files were silently skipped — only a tracing::warn! log was emitted, invisible to the user. The package appeared upgraded but was partially linked, requiring a manual stout link --overwrite <pkg> to fix.

Changes

  • LinkResult struct added to link.rs with linked and overwritten file lists, replacing the bare Vec<PathBuf> return type
  • overwrite_or_skip! macro tracks files removed due to cross-package conflicts
  • upgrade and reinstall now pass overwrite: true and print a warning with overwrite count
  • link command and parallel installer also surface overwrite counts to the user
  • All callers and tests updated for the new return type

All 169 workspace tests pass.

Upgrade and reinstall now pass overwrite=true to link_package, ensuring cross-package symlink conflicts are resolved instead of silently skipped (which left packages partially linked with no visible error). A new LinkResult struct tracks overwritten files so users see a warning when conflicts occur. The parallel installer and explicit link command also surface overwrite counts.
@jhult
jhult merged commit 2270721 into neul-labs:main Jun 30, 2026
4 checks passed
@jhult
jhult deleted the fix/links branch June 30, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant