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

Remove 70,000 lines #194

Closed
wants to merge 16 commits into from
Closed

Conversation

johnbillion
Copy link
Contributor

@johnbillion johnbillion commented Jul 22, 2024

Here's a radical proposal. If these stubs are only used for static analysis then we only need the relevant machine-readable data in the docblocks. Everything else -- including the descriptions -- can go.

This removes 70,000 lines from the stubs file.

What do you think? This is a big win but it also means the stubs are less useful for tools which provide features other than static analysis, for example an IDE.

@johnbillion johnbillion marked this pull request as draft July 22, 2024 22:54
@johnbillion
Copy link
Contributor Author

This needs some more work (for example it's currently wiping out some tags and docblocks that need to be retained). Happy to continue with it if it's a path we want to go down.

@szepeviktor
Copy link
Member

What non-tag parts of the docblock does IDE auto completion display?

@johnbillion
Copy link
Contributor Author

What non-tag parts of the docblock does IDE auto completion display?

Potentially the description.

@johnbillion johnbillion changed the title Remove 60,000 lines Remove 70,000 lines Jul 22, 2024
}

return null;
}

/**
* @param list<\PhpStubs\WordPress\Core\WordPressTag>> $tags
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param list<\PhpStubs\WordPress\Core\WordPressTag>> $tags
* @param list<\PhpStubs\WordPress\Core\WordPressTag> $tags

@IanDelMar
Copy link
Contributor

but it also means the stubs are less useful for tools which provide features other than static analysis, for example an IDE.

I think that people are using the stubs for descriptions in IDEs.

@szepeviktor
Copy link
Member

I think that people are using the stubs for descriptions in IDEs.

Do you do that?

@IanDelMar
Copy link
Contributor

I think that people are using the stubs for descriptions in IDEs.

Do you do that?

I haven't used the stubs for this purpose, but I do find it convenient.

@johnbillion
Copy link
Contributor Author

This was an interesting exercise but I don't think I want to spend more time on it and it still needs a lot more work. Cheers!

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.

3 participants