Closed Bug 1769451 Opened 2 years ago Closed 2 years ago

Fix missing include in public headers

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file, 1 obsolete file)

bug 1768634 is caused by missing include in the SpiderMonkey public header.

we'd better verifying each header can be included alone.
I'm thinking about adding autospider variant that automatically generates cpp files for each public header and build them, in the same way as nonunified variant modifies moz.build.

(In reply to Tooru Fujisawa [:arai] from comment #0)

bug 1768634 is caused by missing include in the SpiderMonkey public header.

maybe something different, or it's more complex case.
#include "js/ProtoKey.h" compiles without modifying the file.

anyway, it found 4 public header files that needs more #include.

(In reply to Tooru Fujisawa [:arai] from comment #1)

(In reply to Tooru Fujisawa [:arai] from comment #0)

bug 1768634 is caused by missing include in the SpiderMonkey public header.

maybe something different, or it's more complex case.
#include "js/ProtoKey.h" compiles without modifying the file.

ProtoKey.h defines the macro, so it needs consumer to hit the issue.
in bug 1768634, it's jspubtd.h, but #include "jspubtd.h" compiles here.
maybe there's behavior difference between clang and MSVC?

bug 1768634 is caused by the preprocessor behavior difference, so not related to #include.

See Also: 1768634
Blocks: 1769550
Priority: -- → P1
Severity: -- → S3

Depends on D146611

IWYU isn't actually enforced by the script. what it verifies is that there's no missing include.

Summary: Verify IWYU for SpiderMonkey public headers → Verify SpiderMonkey public headers includes necessary headers
Attachment #9276968 - Attachment description: Bug 1769451 - Part 2: Add autospider variant for checking header r=sfink → Bug 1769451 - Part 2: Add autospider variant for checking header r=sfink!
Attachment #9276968 - Attachment is obsolete: true
Summary: Verify SpiderMonkey public headers includes necessary headers → Fix missing include in public headers
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/00441393b32f
Part 1: Fix missing include in js/public. r=sfink
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Only part 1 has been pushed.
leave-open?

There's ongoing effort to enforce IWYU. that covers what the abandoned patch was going to cover.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: