Bug 223822 - System installing webkitcorepy can break certain scripts
Summary: System installing webkitcorepy can break certain scripts
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: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-26 15:51 PDT by Jonathan Bedard
Modified: 2021-03-26 16:48 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.42 KB, patch)
2021-03-26 15:59 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>