feat(dry): extract sha256sum, create utils.lua, remove dead version.lua #331
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/qpkg!331
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/dry-sha256sum-utils"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Phase 5 DRY refactoring — extract duplicated patterns into shared functions, remove dead code.
Changes
sha256sum extraction (#0281/#0280)
hash.lua: Addhash.sha256sum(input_string)— hashes a string via sha256sumcli.lua:88: Replace inlineprintf...sha256sum...cutwithhasher.sha256sum(input)build.lua:14: Replacepkg_hash's inline pipe withhash.sha256sum(str)Shared utils (#0285/#0282-#0284)
lib/qpkg/utils.lua: New module withfind_in_path(name)pkgdef.lua: Remove localfind_in_path, useutils.find_in_pathfetch.lua:find_programnow delegates toutils.find_in_pathRemove dead code (#0287/#0286)
lib/qpkg/version.lua: Deleted (imported by zero modules, deprecated)test_qpkg_spec.luaTesting
Closes #281
Review — Approved
Clean DRY refactoring. Verified:
version.luain codebaseAll three changes are behavior-preserving. The
fetch.luaswitch fromcommand -vtoio.openis functionally equivalent for the tools being searched (wget, curl, fetch, ftp, luapp).Non-blocking
hash.sha256sumandutils.find_in_pathlack direct unit tests (only indirect coverage through callers). Filed as #332.