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

Add support for deprecated mcdoc types #1605

Open
misode opened this issue Sep 26, 2024 · 0 comments
Open

Add support for deprecated mcdoc types #1605

misode opened this issue Sep 26, 2024 · 0 comments
Labels
✨ feature New feature or request /mcdoc

Comments

@misode
Copy link
Member

misode commented Sep 26, 2024

It is useful to mark certain mcdoc types as deprecated, especially in the context of vanilla-mcdoc. On the one hand we want to keep that repository up-to-date with modern schema names and structures, but on the other hand people are relying on these types to describe their own custom mcdoc types. Since there is no versioning for vanilla-mcdoc, Spyglass automatically downloads and uses the latest version. We need to make sure that existing, frequently used types (within reason) stay available, but still mark them as deprecated so users move away from them.

I propose the following syntax to mark mcdoc types as deprecated:

/// @deprecated Use ::java::server::world::item::ItemStack instead
type InventoryItem = ItemStack

Note that this is not the same as the #[deprecated] attribute, which is a runtime deprecation warning. This proposal would mark mcdoc types in source as deprecated.

@misode misode added ✨ feature New feature or request /mcdoc labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request /mcdoc
Projects
None yet
Development

No branches or pull requests

1 participant