Repository navigation
COPY: no --copy-libraries reads OF/IN lib by directory name; declared dirs first (Part of #8111) - #8153
Merged
Conversation
…red dirs first (Part of #8111) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
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.
Part of #8111 (slice 6, follows #8143).
With no
--copy-libraries, the resolver ignored the library qualifier ofCOPY x OF|IN liband the directories a workspace declares as copy libraries. It now reads a qualified COPY from the directory namedlib(any case; member name any case, any extension or none), and tries the directories declared in.cobolplugin/proc_grps.json/.vscode/settings.jsonfirst for an unqualified COPY. Zero or several hits fall back to the default resolver, so no edge is lost and no gap or collision is recorded; an explicit--copy-librariesdeclaration is unchanged. The declaration reader moved from the lens intodeclared_dirs_in_folderso the lens and the resolver read the same bytes.Class / Sibling gaps
Class: a COPY whose library is spelled (
OF/IN lib) or declared by the workspace (proc_grps, settings paths-local) but resolved by the default resolver, which ignored both. Members handled here, each with a test: qualifier equal to a directory name in any case (3 cases x 3 member spellings x OF/IN, with two same-named members in other directories); the second library chosen by its own qualifier; a qualifier naming no directory and two directories of one name (fall back to the default); a declared directory for an unqualified COPY via proc_grps and via settings (JSONC); malformed and absolute declarations change nothing; EXEC SQL INCLUDE unchanged.Sibling gaps: (1) extensionless members in an UNdeclared library with no COBOL-extension sibling are never claimed as COBOL by the lens, so the resolver never sees them (slice 5 covers only declared libraries; needs a lens evidence rule, different mechanism). (2) Libraries derived from JCL/PROC SYSLIB: a different declaration source, not here. (3) The 11
missand 2ambiguousthe census still reports on the burned and non-candidate corpus are other classes: not touched by this change, to be classified in a following slice. (4)cics_census.py preflightwiring: separate tool change.Evidence
copy_resolution_census.py, burned + non-candidate corpus, counts only), before and after this change, identical:repos 40, members 1989, agree 1356, miss 11, ambiguous 2, different 0, neither 620. The real corpora hold no qualified COPY this change moves; it is proven on authored fixtures (20 of the 25 new tests fail on main's resolver).crucible_check.py --update --yes: both fixtures already match).pr_gates --ratchets: 9 pass.pr_gates --fast: all gates pass except mypy audit on a first version, fixed (targets: list[Any]), mypy audit now clean.Checklist: partial [c:c9828d15] -- counts reported above; the classes of the 11 misses are not yet broken out
Checklist: partial [c:43ee243d] -- library qualifier and declared-directory classes fixed; the remaining misses and extensionless-in-undeclared-library are left
Remaining slices: classify the 11 miss / 2 ambiguous; lens rule for extensionless members in undeclared libraries (language_lens.py + test); wire into
cics_census.py preflight([c:18fcac1e], tests/tools/cics_census.py + test).🤖 Generated with Claude Code