Address the non-blocker findings from the 3.1 review#2082
Merged
Conversation
The frecency history bounded files per project but not the number of project roots, so churning through many projects grew the store without bound (dead roots persisted forever). Add projectile-frecency-max-projects (default 100); on save, keep the most recently active roots and drop the rest, mirroring the existing per-project file cap.
- Keep ripgrep's stderr out of the JSON stdout stream (dedicated :stderr buffer), so a diagnostic line can't split a match across filter chunks and get silently dropped. - Promote projectile-replace--scan-chunk-size to a public defcustom (projectile-replace-scan-chunk-size), since it's user-facing tuning. - Type projectile-replace-max-matches as natnum, not integer. - Correct the projectile-replace--candidates docstring: the literal narrowing helper matches case-insensitively (a safe superset), not case-sensitively. - Cover the write-back skip when a live buffer is edited *before* a match between scan and apply (positions invalidated).
- Only arm file-notify watches from the auto-update option's :set when projectile-mode is on; arming with the mode off leaves watches with no teardown path until Emacs exits. - Reset projectile--current-project when the mode is disabled, so re-enabling it fires projectile-project-changed-functions on the first re-entry into the last-seen project. - Note the broken-symlink-marker semantics of the directory-listing detection (harmless, but different from the old file-exists-p probe).
- projectile-session--read-file now messages when it skips a real session file written by an incompatible format version, instead of silently restoring nothing. - Drop the :file-fn mention from projectile-related-files-fn's docstring; it was documented but never implemented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the bug-fix PR (#2081): the remaining nice-to-haves and test-coverage gaps the v3.1 review turned up. Five focused commits; the version-metadata bump is deliberately left out for now. 888 specs, clean
--warnings-as-errors, relint clean.Frecency
projectile-frecency-max-projects(default 100). The history capped files per project but not the number of roots, so churning through projects grew the store forever; the least recently active roots are now dropped on save. Tests: the cap, plus the previously-untested disk-newer-timestamp merge branch.Reviewable search/replace
:stderrso a diagnostic line can't split a match across filter chunks and get silently dropped.projectile-replace-scan-chunk-sizeto a publicdefcustom; typeprojectile-replace-max-matchesasnatnum.projectile-replace--candidatesdocstring (the literal-narrowing helper matches case-insensitively - a safe superset).Watch / mode lifecycle
:setwhenprojectile-modeis on (otherwise they linger with no teardown).projectile--current-projectwhen the mode is disabled, soprojectile-project-changed-functionsfires on the first re-entry after a re-enable.Sessions / file kinds
projectile-session--read-filenow messages when it skips a session written by an incompatible format version, instead of silently restoring nothing.:file-fnkey fromprojectile-related-files-fn's docstring.Deliberately left for later: the
3.1.0→3.2.0version-metadata reconciliation, the rg-vs-elisp full parity test / end-to-end rg subprocess test (needrgin CI), and a few pure nits (the deadtickstruct slot,cl-positionin the session code). The already-shipped tests cover theprojectile-sort-order-as-function and fallback branches, so that gap was already closed.