kevinschweikert / mndp

Elixir implementation of the Mikrotik Neighbor Discovery Protocol
MIT License
10 stars 0 forks source link

Consider removing hard dependency on owl #9

Closed fhunleth closed 1 month ago

fhunleth commented 1 month ago

While I like owl, I think it's really nice when libraries like this have minimal dependencies. It comes in handy when working on projects where people scrutinize each dependency. Until you see how it's used here, it's a little surprising when a networking library pulls in a TUI library.

I have.a couple ideas that I wanted to run by you:

  1. Make :owl an optional dependency. Users will get an error when running the TUI functions. This seems annoying, but not unexpected.
  2. Break the TUI into another library. I don't know what your plans are for the TUI, but if you were thinking about extending it a lot, this might make sense regardless.
  3. Rewrite the :owl parts. Erlang's IO formatting supports fixed width fields well. See https://www.erlang.org/doc/apps/stdlib/io.html#fwrite/3.
kevinschweikert commented 1 month ago

Absolutely agree! This is just a leftover from my initial development, and i wanted to have a nice and easy way to update a table in the terminal and owl itself has no further required dependencies. But it is definitely not my whish to require owl as a hard dependency. But i would still love to get some nice CLI output right out of the box, so i probaby like Option 3 the best and reuse the native Erlang functionality. Thanks for the input and will add it to my backlog!

kevinschweikert commented 1 month ago

@fhunleth I started working on this in the linked PR