Make squid.conf LegacyParser available as non-global#2397
Make squid.conf LegacyParser available as non-global#2397yadij wants to merge 1 commit intosquid-cache:masterfrom
Conversation
... to assist transition to new ConfigParser API for logic which is buried too deep or called from too many legacy code places to pass the parser in.
|
One example of legacy code the description refers to can be seen in PR #2398 where the helper "children ..." configuration options parser is converted by itself without the many parsers using it being touched - to simplify review. After that PR is merged the callers can be individually refactored, with finally a removal of |
rousskov
left a comment
There was a problem hiding this comment.
assist transition to latest ConfigParser API for logic which is buried too deep or called from too many legacy code places to pass the parser in.
In this context, a function returning an allocated-once object is equivalent to a global.
That "transition to latest ConfigParser API" should avoid globals (and equivalent concepts) rather than making them easier to access.
This PR also conflicts with backlogged work.
... to assist transition to latest ConfigParser API for logic which
is buried too deep or called from too many legacy code places to
pass the parser in.