WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239762
test-webkitperl outputs errors about uninitialized $platform variable
https://bugs.webkit.org/show_bug.cgi?id=239762
Summary
test-webkitperl outputs errors about uninitialized $platform variable
Kimmo Kinnunen
Reported
2022-04-26 01:28:52 PDT
test-webkitperl outputs errors about unused $platform variable
Attachments
Patch
(17.86 KB, patch)
2022-04-26 01:34 PDT
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Patch
(17.41 KB, patch)
2022-04-27 00:47 PDT
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Patch
(17.46 KB, patch)
2022-04-27 01:11 PDT
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kimmo Kinnunen
Comment 1
2022-04-26 01:34:14 PDT
Created
attachment 458340
[details]
Patch
Alexey Proskuryakov
Comment 2
2022-04-26 09:23:27 PDT
Comment on
attachment 458340
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458340&action=review
> Tools/ChangeLog:9 > + Extract the tested code to a module to be able to imported in well-defined > + manner.
Do we have to do all of this to silence one warning? Splitting simple Perl scripts into multiple files creates significant barriers to development. Folks have had a lot of trouble refactoring Perl code because of webkitdirs.pm already. Factoring out well isolated and abstracted pieces of functionality is one thing, but pulling a function that's intrinsically inseparable from the main script seems wrong to me.
Kimmo Kinnunen
Comment 3
2022-04-26 10:48:46 PDT
This already got r+ from the bug linked to in see also. The other option is to make the perl script a module too, but I don't know perl enough to understand how to import such a module. eg. how to do the logical equivalent of pseudo-code: use filter-build-webkit qw(shouldIgnoreLine $platform); It's not so much a warning as quite bogus way of running the script via eval and not having half the variables defined.
Kimmo Kinnunen
Comment 4
2022-04-26 10:49:38 PDT
https://www.perlmonks.org/?node_id=621378
addreresses some part of "executable as a module"
Kimmo Kinnunen
Comment 5
2022-04-26 11:44:18 PDT
In essence I agree, but also running code in a bogus way is not very good too. Investigate how to export stuff from perl script as a module? Move all code to the module? Write all code in python and be done with it?
Kimmo Kinnunen
Comment 6
2022-04-26 11:48:54 PDT
https://stackoverflow.com/questions/468675/how-can-i-test-a-standalone-perl-script
Kimmo Kinnunen
Comment 7
2022-04-27 00:47:58 PDT
Created
attachment 458428
[details]
Patch
Kimmo Kinnunen
Comment 8
2022-04-27 01:11:14 PDT
Created
attachment 458432
[details]
Patch
Alexey Proskuryakov
Comment 9
2022-04-27 08:39:45 PDT
Comment on
attachment 458432
[details]
Patch I'm not enough of a Perl expert to understand every technical detail here. But this is structured elegantly, and clearly is a good improvement.
EWS
Comment 10
2022-04-28 00:40:12 PDT
Committed
r293568
(
250082@main
): <
https://commits.webkit.org/250082@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 458432
[details]
.
Radar WebKit Bug Importer
Comment 11
2022-04-28 00:41:13 PDT
<
rdar://problem/92445079
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug