Repository navigation
refactor: move leaf utilities under internal/ - #650
Merged
Merged
Conversation
Phase 1: the packages with no project dependencies move first, so every later phase builds on finished leaves; the goldens pin the behavior.
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.
Summary
Phase 1 of the internal restructuring: the three packages with no project dependencies move under
internal/. Mechanical only — no behavior changes, and the Phase 0 goldens pass unchanged.log→internal/log: moved as is; the name and API stay. 26 files change their import.utils/sqliteutil→internal/sqlitex: moved; the exported API is nowCountRowsandQueryRows. The row-callback helper behind them (QuerySQLite) had no other caller and becomes the unexportedeachRow.internal/timeconv(new): the five timestamp helpers that lived in the browser packages, with their bodies and tests moved verbatim —Chromium(waschromium.timeEpoch),UnixMicro,UnixMilli,Unix(werefirefoxMicros/firefoxMillis/firefoxSeconds), andCoreData(wassafari.coredataTimestamp). Every conversion keeps today's rule: zero time for non-positive input or a year outside [1, 9999].timeconvandsqlitexnames; RFC-012 Phase 8 and RFC-011 record that, after the switch-over, the compatibility tests move out ofcmd/hack-browser-datainto the packages they cover, leavingcmdwith only the flag-surface test.The ABE unit is untouched; none of its packages imports the moved code.
Verification
go build ./...for darwin, windows, and linux;go vetwith the test files for windows and linux;go test ./...on Go 1.20.14, including the compatibility goldens.GOOS=darwin,windows, andlinux; gofumpt and goimports are clean.Checklist
refactor/main-v2integration branch (mainis frozen during the refactor)go 1.20(do not bump)