arbtt icon indicating copy to clipboard operation
arbtt copied to clipboard

Cannot import Arbtt as a library

Open Gab0 opened this issue 1 year ago • 1 comments

The current arbtt.cabal doesn't specify an Arbtt library. An importable library would help to write external analysis tools for Arbtt data. The original Arbtt log parsing functions could be reused, for example.

Is there a way to import the library into other Haskell projects and I'm missing it? Alternatively, is there a reason for the library to not be exposed?

If code modifications are required to import Arbtt as a library, I could execute them and create a merge request here.

Gab0 avatar Aug 04 '22 03:08 Gab0

The problem with exporting the internals as a library is that it then defines an API that needs to make sense, needs to be do documented and to be maintained. Right now I can change my internal data structures completely and don't have to worry.

So far, additional tools tend to add functionality by using the command line interface of arbtt, and in particular the csv and JSON output formats. Would that work for you as well?

nomeata avatar Aug 04 '22 04:08 nomeata

Understandable. I used the CLI and csv formats for some tools in the past. This time the idea involves more complex interactions between the tool and the parser. So I'll see if I can tinker with parts of the internal files, or just use the CLI and csvs. Thanks!

Gab0 avatar Aug 04 '22 14:08 Gab0

If you find the CLI unsuitable feel free to reopen this - I explained the status quo, but that doesn't mean it cannot be changed :-)

nomeata avatar Aug 04 '22 19:08 nomeata