Skip to content

fix(completion): compile the dumpfile's .zwc atomically - #53

Open
edjeffreys wants to merge 1 commit into
mattmc3:mainfrom
edjeffreys:fix/atomic-zcompdump-zwc
Open

edjeffreys wants to merge 1 commit into
mattmc3:mainfrom
edjeffreys:fix/atomic-zcompdump-zwc

Conversation

@edjeffreys

Copy link
Copy Markdown

zrecompile writes the .zwc in place, so shells starting together read each other's half-written file: "zrecompile:zcompile:99 invalid zwc file"

Instead; compile to a per-shell temp .zwc and rename it over, like compdump does.

Also test the compile, the stale recompile, and 12 shells racing it

- zrecompile writes the .zwc in place, so shells starting together read
  each other's half-written file: "zrecompile:zcompile:99 invalid zwc file"
- compile to a per-shell temp .zwc and rename it over, like compdump does
- test the compile, the stale recompile, and 12 shells racing it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zephyr-compaudit-warn &!
fi

# Recompiles only if stale, and renames atomically, so concurrent shells are safe.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is incorrect; it does not rename atomically 😅

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