Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix header errors when parsed standalone#14272

Merged
iluuu1994 merged 1 commit into
php:masterphp/php-src:masterfrom
iluuu1994:fix-header-errorsiluuu1994/php-src:fix-header-errorsCopy head branch name to clipboard
May 20, 2024
Merged

Fix header errors when parsed standalone#14272
iluuu1994 merged 1 commit into
php:masterphp/php-src:masterfrom
iluuu1994:fix-header-errorsiluuu1994/php-src:fix-header-errorsCopy head branch name to clipboard

Conversation

@iluuu1994

@iluuu1994 iluuu1994 commented May 19, 2024

Copy link
Copy Markdown
Member

This is annoying for multiple reasons:

  1. LSPs can show many errors for these files.
  2. LSP can stop parsing these files completely if there are too many errors, resulting in spotty LSP features.

On my machine, two debug build without ccache took 55s/56s for master, and 56s/56s for this branch, so it does not seem like it changed significantly.

@iluuu1994 iluuu1994 marked this pull request as ready for review May 19, 2024 23:11
@iluuu1994 iluuu1994 requested a review from dstogov as a code owner May 19, 2024 23:11
@iluuu1994 iluuu1994 requested review from Girgias and TimWolla May 19, 2024 23:11

@dstogov dstogov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see anything bad.
I'm not sure why do you need a separate header for zend_result...

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

This is annoying for multiple reasons:

1. LSPs can show many errors for these files.
2. LSP can stop parsing these files completely if there are too many errors,
   resulting in spotty LSP features.
@iluuu1994 iluuu1994 force-pushed the fix-header-errors branch from 8bd45c3 to 5edc5e5 Compare May 20, 2024 16:33
@iluuu1994

Copy link
Copy Markdown
Member Author

I'm not sure why do you need a separate header for zend_result...

It reduced a few imports of zend_types.h. I reverted the change and include zend_types.h instead.

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm in favor, but would like to point out this RFC: https://wiki.php.net/rfc/include_cleanup and this PR: #10609.

I believe there should be a more systematic approach than just making a few changes here and there when one notices the issues.

@iluuu1994

Copy link
Copy Markdown
Member Author

I'm aware of the RFC, but since it was declined, it doesn't seem sincere to make the same changes again. Another proposal might be more successful now, with less drama.

@iluuu1994 iluuu1994 merged commit 6335264 into php:master May 20, 2024
@MaxKellermann

Copy link
Copy Markdown
Contributor

This PR adds forward declarations which was an idea I proposed in https://wiki.php.net/rfc/include_cleanup but was rejected by the majority of PHP developers, including @dstogov - now I wonder why he agreed with this PR ... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.