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

Declare main classes API status #204

Merged
merged 1 commit into from
May 3, 2024

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Apr 29, 2024

Turns out mods integrating with or attempting to be compatible with Freecam may wish to compile against our classes and use our API.

e.g. FirstPersonModel compiles against Freecam v1.1.6 and uses the public API Freecam.isEnabled() that has (luckily) remained ABI compatible since before our initial commit.

It may be useful to explicitly state the API status of various public methods, even if for no reason other than to make us think twice before changing the public API.

I've only done this for the main classes, Freecam and FreeCamera for now. Ideally, we'd declare the API status of all public classes.

One method I could only trace back to v0.2.2, which is the oldest release on GitHub and pre-dates the initial commit (AFAICT).

@MattSturgeon MattSturgeon added documentation Improvements or additions to documentation dev Only affects developers labels Apr 29, 2024
Comment on lines +323 to 324
@ApiStatus.AvailableSince("0.2.2")
public static boolean isEnabled() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be older. 0.2.2 is the oldest jar I can find.

Copy link
Collaborator

@hashalite hashalite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, thank you!

@MattSturgeon MattSturgeon merged commit 3c94341 into MinecraftFreecam:main May 3, 2024
@MattSturgeon MattSturgeon deleted the api-status branch May 3, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Only affects developers documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants