[tor-bugs] #32605 [Metrics]: Remove external dependencies to implementation classes
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 25 16:10:23 UTC 2019
#32605: Remove external dependencies to implementation classes
-----------------------------+----------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: assigned
Priority: Medium | Milestone:
Component: Metrics | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-----------------------------+----------------------
Last week I started working on #24028. But after making a few local
commits I realized that there's one major issue that makes this task
harder than it should be: external dependencies to metrics-lib's
implementation classes.
Some background: The idea behind metrics-lib was to provide a library for
parsing descriptors. It contains one package with interfaces and another
package with implementations of those interfaces. External applications,
including our own, shall only depend on the first package, so that we can
make changes to the second package at any time.
After a while we started sharing code (not interfaces) from metrics-lib in
other applications, including code to parse `index.json` files or code to
sanitize web server logs. And even though sharing code is a good idea in
many cases, it sometimes comes at the cost of creating unwanted
dependencies. I'd rather want to turn metrics-lib into just the
descriptor-parsing library as it was before and share more generic code
between all code bases in another way than stuffing it into metrics-lib.
Here's my suggestion: We remove external dependencies to metrics-lib's
`impl`, `index`, `internal`, and `log` packages, put out a set of
releases, refactor those packages including renaming them as planned in
#24028, and finally come up with a better plan for sharing code between
modules.
I'm going to post two branches for review here in a minute.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32605>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list