RESOLVED FIXED 218480
Include path in generated IDL dependencies
https://bugs.webkit.org/show_bug.cgi?id=218480
Summary Include path in generated IDL dependencies
Keith Rollin
Reported 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.
Attachments
Patch (2.43 KB, patch)
2020-11-03 00:41 PST, Keith Rollin
no flags
Patch (2.55 KB, patch)
2020-11-03 10:40 PST, Keith Rollin
no flags
Keith Rollin
Comment 1 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.
Keith Rollin
Comment 2 2020-11-03 00:41:09 PST
Radar WebKit Bug Importer
Comment 3 2020-11-03 00:41:23 PST
Sam Weinig
Comment 4 2020-11-03 09:33:54 PST
You will need to run run-bindings-tests --reset-results to fix the bindings tests/bot.
Sam Weinig
Comment 5 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.
Keith Rollin
Comment 6 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.
Keith Rollin
Comment 7 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.
Keith Rollin
Comment 8 2020-11-03 10:40:01 PST
Keith Rollin
Comment 9 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).
Brent Fulgham
Comment 10 2020-11-03 15:55:08 PST
Comment on attachment 413073 [details] Patch The bots now seem happy. r=me
EWS
Comment 11 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].
Note You need to log in before you can comment on or make changes to this bug.