Skip to content

docs: list all supported languages for --lang - #291

Open
Socialpranker wants to merge 1 commit into
1Password:mainfrom
Socialpranker:docs/lang-list-all-six
Open

docs: list all supported languages for --lang#291
Socialpranker wants to merge 1 commit into
1Password:mainfrom
Socialpranker:docs/lang-list-all-six

Conversation

@Socialpranker

Copy link
Copy Markdown

Disclosure: this patch was prepared with AI assistance (Claude Opus 5). I checked the enum and the cargo features myself before opening this.

Problem

The --lang entry in docs/src/usage/configuration.md says:

Currently, this option can be set to either kotlin, swift, go, or typescript.

AvailableLanguage in cli/src/args.rs has six variants:

pub enum AvailableLanguage {
    Kotlin,
    Scala,
    Swift,
    Typescript,
    #[cfg(feature = "go")]
    Go,
    #[cfg(feature = "python")]
    Python,
}

So scala was missing entirely, and python was missing as well.

Scala is not an obscure omission — docs/src/usage/usage.md lists it among the supported languages and uses it in an example (typeshare ./my_rust_project --lang=scala ...), and the README mentions it too. The gap is specific to this one file.

Fix

List all six, and note the feature gating for the two that have it ([features] go = [], python = [] in cli/Cargo.toml). The phrasing follows the --go-package entry a few lines further down in the same file, which already describes its feature requirement that way.

The --lang description named kotlin, swift, go and typescript, but
AvailableLanguage in cli/src/args.rs has six variants: Kotlin, Scala,
Swift and Typescript unconditionally, plus Go and Python behind their
respective cargo features.

Scala was missing entirely even though usage.md lists it and uses
--lang=scala in an example, and python was missing as well. The feature
gating is spelled out the same way the --go-package entry further down
this file already does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants