Detect new platforms automatically #403
Labels
discussion
The details of this issue have not been figured out yet.
spec
This issue involves the tldr client specification.
Version 2.1 of the client specification suggests to "detect new platforms added to the relevant pages directory automatically".
I am not sure how I feel about this suggestion. The specification does not give a clear indication what platforms exist and how to detect this existence. The set of platforms was always given implicitly by the pages that existed, and new platforms were seemingly added conservatively (#354). However, there is also the special case of the "macos" platform which should alias to "osx".
If we were to move to discover the set of platforms from the directory, we would change our
enum PlatformType
to be astruct PlatformType(String)
or similar. Since we would still want to display some possible values for--platform
intldr --help
, we would either have to choose some platforms to display, or discover the platforms every time we runtldr --help
. The latter approach is very complicated though, because we need to parse command line parameters and compute the effective configuration before we know where to look for pages in the first place.Overall, I am not sold on this feature for now and am unlikely to accept PRs before we clear things up. Discussion welcome :)
CC @dbrgn @kbdharun
The text was updated successfully, but these errors were encountered: