Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schema #7047

Closed
wants to merge 1 commit into from
Closed

Update schema #7047

wants to merge 1 commit into from

Conversation

InSyncWithFoo
Copy link
Contributor

@InSyncWithFoo InSyncWithFoo commented Jan 19, 2024

This is basically a copy from downstream, most content of which was originally copied from this file and configuration.md. I'm not sure about overrides; I could have sworn I saw it mapping to an empty object at the very end of the schema, but after checking recent commits of this repo, now I think I just hallucinated.

I changed the formatting for title and description a bit; inline code are now delimited by backticks (similar to Markdown, partly because I wanted to make the transpilation to Markdown easier). markdownDescription is for VSCode and x-intellij-html-description is for PyCharm; the latter is automatically generated from the former using marked.parseInline(). Regardless, it still doubles the maintenance efforts required, so this might be considered a breaking change.

@erictraut
Copy link
Collaborator

Why do you repeat the description under both a "description" and a "x-intellij-html-description" key? I'd prefer not to duplicate information like this because it will become a maintenance burden to keep it in sync. I'm also not sure that we should be duplicating full documentation here. A summary of each option (like we use in package.json) is probably more appropriate.

@InSyncWithFoo
Copy link
Contributor Author

@erictraut This is just how IDEs differ from each other (see the links in the original post), and I wanted to provide tailored support for them. Here's the state of affairs:

  • VSCode seems to render description as either Markdown or reStructuredText, which ever more applicable. If markdownDescription presents, it would use that.
  • PyCharm render both title and description as plain text, providing x-intellij-html-description as a way to allow rich formatting; this is also preferred over description.
  • I haven't tried other IDEs, which may or may not have their own derivations.
  • I omitted these properties whenever there are no differences between them and the original description, which, as stated, already written in a Markdown-like format to minify the duplication.

The same schema was already submitted to SchemaStore as a subschema of PyProject, and would be used for pyproject.toml files. This does not apply to pyrightconfig.json, however. I was told to keep the original URL intact, which led me here.

Perhaps the actual schema could be saved at another file and an action could be configured to automatically convert description fields to x-intellij-html-description fields, provided that the former is written in Markdown? This would help VSCode and PyCharm users, but might be a bit hard on the eyes of other IDEs' users.

I understand that duplication is better avoided. Feel free to reject this PR.

@erictraut
Copy link
Collaborator

Yeah, sorry, but I don't think I want to accept this change.

@erictraut erictraut closed this Jan 19, 2024
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