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

Accept unknown keys in configurations to pass to the manifest #2523

Open
dotNomad opened this issue Jan 10, 2025 · 1 comment
Open

Accept unknown keys in configurations to pass to the manifest #2523

dotNomad opened this issue Jan 10, 2025 · 1 comment
Labels
discovery Additional discovery is necessary to determine a solution enhancement New feature or request

Comments

@dotNomad
Copy link
Collaborator

dotNomad commented Jan 10, 2025

In an effort to avoiding always needing to make adjustments to Publisher's code and schema to support new Connect features we should allow configurations to accept unknown key value pairs and pass them to the manifest. This will address the question raised in #2510.

Key value pairs in specific sections should be passed to the section they are part of. For example: python.some_key should be part of the Python section of the Manifest when it is constructed.

Trade-offs

  • We will lose the "The selected Configuration has a schema error on line..." warning in the sidebar when an unknown key is used.
  • Typos for known, optional keys will no longer show a warning. For example: a user could type alow_uv instead of allow_uv. The Publisher will have to rely on Connect for any user assistance to understand discrepancies between what is expected and what occurred due to typos like this.

Note: Unknown keys are ignored by Connect servers so supplying configurations with unknown keys will have no effect.

More context for this issue can be found in this Slack thread: https://positpbc.slack.com/archives/C05D7NZD52S/p1736434807194889

@dotNomad dotNomad added the enhancement New feature or request label Jan 10, 2025
@dotNomad
Copy link
Collaborator Author

Ideally we allow any key value pairing and sections can be created as needed by the user like:

[python]
version = '3.15.1'

[python.package_manager]
name = 'pip'
allow_uv = true

As a potential alternative, depending how decoding / marshaling goes when we pick up this task another idea is to have a generic [manifest] section that is a dictionary:

[manifest]
"python.package_manager.allow_uv": "true"

The downside of the above is that this could potentially allow duplicate configuration settings without an indication of which would be used when the manifest is created.

I'll add the discovery label here to indicate that we need to look into what is possible.

@dotNomad dotNomad added the discovery Additional discovery is necessary to determine a solution label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery Additional discovery is necessary to determine a solution enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant