Bug 218480 - Include path in generated IDL dependencies
Summary: Include path in generated IDL dependencies
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-03 00:35 PST by Keith Rollin
Modified: 2020-11-03 17:13 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.43 KB, patch)
2020-11-03 00:41 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (2.55 KB, patch)
2020-11-03 10:40 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2020-11-03 00:35:57 PST
Changes in Bug 218378 and Bug 217696 have lessened the reliance on VPATH to find files. This means that more places need to be explicit about the locations of their files. This change updates preprocess-idls.pl to include full- and partial-paths when generating dependency information.
Comment 1 Keith Rollin 2020-11-03 00:39:21 PST
This change addresses an issue where Document.idl would alway get rebuilt because a file it depended on couldn't be found because it's path was not specified in SupplementalDependencies.dep.
Comment 2 Keith Rollin 2020-11-03 00:41:09 PST
Created attachment 413011 [details]
Patch
Comment 3 Radar WebKit Bug Importer 2020-11-03 00:41:23 PST
<rdar://problem/70984504>
Comment 4 Sam Weinig 2020-11-03 09:33:54 PST
You will need to run run-bindings-tests --reset-results to fix the bindings tests/bot.
Comment 5 Sam Weinig 2020-11-03 09:34:58 PST
Though, it looks like the tests are actually failing due to issues in the code:

Use of uninitialized value $srcroot in regexp compilation at WebCore/bindings/scripts/preprocess-idls.pl line 308.
Use of uninitialized value $sdkroot in regexp compilation at WebCore/bindings/scripts/preprocess-idls.pl line 309.
Use of uninitialized value $built_products_dir in regexp compilation at WebCore/bindings/scripts/preprocess-idls.pl line 310.
Comment 6 Keith Rollin 2020-11-03 09:40:33 PST
I didn't see those errors/warning locally. And how can those variables be considered uninitialized? Aren't I initializing all of them just a few lines up? My Perl-fu is weak, but I didn't know it was *that* weak.
Comment 7 Keith Rollin 2020-11-03 09:42:18 PST
Ah. I guess it's because the $ENV accesses produce 'undefined' results, due to run-bindings-tests not running in the context of Xcode.
Comment 8 Keith Rollin 2020-11-03 10:40:01 PST
Created attachment 413073 [details]
Patch
Comment 9 Keith Rollin 2020-11-03 10:43:26 PST
run-bindings-tests says that it compares the results it generates against reference files. So it seems to me that preserving the previous preprocess-idls.pl behavior when running run-bindings-tests is the best way to pass these tests. So, if things like SRCROOT aren't around, I fall back to calling `basename`, as before.

Technically, that causes the tests to pass. I'm not sure if it's in the spirit of run-bindings-tests, though. I think it should be OK since the point is to test the generation of the binding code, and perhaps the dependency relationship between the IDL files, and not the actual expression of those IDL files (that is, it probably doesn't matter to run-bindings-tests if the files are expressed as bare names or partial or full paths).
Comment 10 Brent Fulgham 2020-11-03 15:55:08 PST
Comment on attachment 413073 [details]
Patch

The bots now seem happy. r=me
Comment 11 EWS 2020-11-03 17:13:09 PST
Committed r269347: <https://trac.webkit.org/changeset/269347>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413073 [details].