Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #6802

Closed (moved)
Open
Opened Sep 10, 2012 by Nick Mathewson@nickm🥄

Make our config parsing less kludgy

If our only configuration types were strings, numbers, booleans, and so forth, our existing configuration parsing mechanism would be nifty. But right now, we do entirely too much with STRING, LINELIST, and worst still LINELIST_V.

We've become decent at implementing some patterns to work around this, but it would be neat to get much better.

So as first steps, I suggest that we:

  • Split the parts of the configuration file parsing that handle the abstract bits of config_format_t into their own file.
  • Turn config_type_t into an OO thing, so that it's easier to add more.
  • Teach the linelist types and the smartlist types to be a bit smarter about what they are lists of, so that every list type doesn't need special handling.
  • Make our linelist_v types have an explicit syntax for sections.
  • Implement an additional function to handle the common case of a line that has some positional arguments and some k{=v} arguments.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: unspecified
Milestone
Tor: unspecified
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#6802