Bug 223822

Summary: System installing webkitcorepy can break certain scripts
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: alancoon, dewei_zhu, ews-watchlist, glenn, jlewis3, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2021-03-26 15:51:22 PDT
This issue happens when webkitcorepy (or webkitscmpy) is installed to the system's Python libraries, and the installed version does not match the version checked in to WebKit. This issue is caused by us doing sys.path.append instead of sys.path.insert(0, ...).
Comment 1 Radar WebKit Bug Importer 2021-03-26 15:51:58 PDT
<rdar://problem/75905163>
Comment 2 Jonathan Bedard 2021-03-26 15:59:35 PDT
Created attachment 424413 [details]
Patch
Comment 3 Alan Coon 2021-03-26 16:09:37 PDT
So the fix was something along the lines of Cmd+F for imports of "webkitcorepy" and then changing the insertion method?

rs=me as I'm not sure which files need this change but that logic makes sense to me
Comment 4 Alan Coon 2021-03-26 16:11:19 PDT
Comment on attachment 424413 [details]
Patch

The services failure looks unrelated
Comment 5 Jonathan Bedard 2021-03-26 16:20:50 PDT
(In reply to Alan Coon from comment #3)
> So the fix was something along the lines of Cmd+F for imports of
> "webkitcorepy" and then changing the insertion method?
> 
> rs=me as I'm not sure which files need this change but that logic makes
> sense to me

Actually, I just searched for 'sys.path.appned', that's almost always incorrect, and even if it's not implicated in this bug, it's just going to bite us later.
Comment 6 Jonathan Bedard 2021-03-26 16:47:51 PDT
Committed r275122 (235827@main): <https://commits.webkit.org/235827@main>