Skip to content

Make squid.conf LegacyParser available as non-global#2397

Open
yadij wants to merge 1 commit intosquid-cache:masterfrom
yadij:arc-cfg-legacy-1
Open

Make squid.conf LegacyParser available as non-global#2397
yadij wants to merge 1 commit intosquid-cache:masterfrom
yadij:arc-cfg-legacy-1

Conversation

@yadij
Copy link
Copy Markdown
Contributor

@yadij yadij commented Apr 2, 2026

... 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.

... 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.
@yadij
Copy link
Copy Markdown
Contributor Author

yadij commented Apr 2, 2026

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 LegacyParser from the entire section(s) of code.

Copy link
Copy Markdown
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants