Fork me on GitHub
#babashka-sci-dev
<
2024-07-03
teodorlu08:07:10

I added an :omit-git-url option to the babashka.neil/dep-add opts map yesterday. Should the semantics of :omit-git-url be documented somewhere? If yes, ideas on where that makes sense? The function docstring?

borkdude08:07:16

This is just an internal implementation detail, I think?

teodorlu09:07:14

Yes, implementation detail.

teodorlu09:07:27

So no need to add documentation, in your view?

borkdude09:07:03

The contrary: internal things should not be documented (as public API). Since they are an internal detail, it might change at any time and users should at no time rely on this.

teodorlu09:07:34

So instead, I might think about how to cover the behavior with tests? In this case, there’s one at https://github.com/teodorlu/neil/blob/644de185def8fdec7133c4ab93b95269539f9010/test/babashka/neil/dep_upgrade_test.clj#L61-L70.

teodorlu10:07:55

A different option could be to rename the key from :omit-git-url to :dep-add/omit-git-url. (https://github.com/babashka/neil/pull/234).

borkdude10:07:44

I think you're overthinking it a bit, but what I usually do with internal options is to use ::omit-git-url auto-namespaced keywords, so when you're in a babashka.neil.impl namespace the impl part even becomes part of the name

👍 1