Repository navigation
Conversation
3777bff to
755b6ff
Compare
755b6ff to
42c3493
Compare
42c3493 to
9cf89c9
Compare
|
Sorry for noticing so late. I would say, having this script in the rpo would be a good idea, and so we can improve it step by step, to the point where it can be added to the lint step, so that such changes are detected in the future and we don't add regressions. I already noticed a small chnage in the I'll take a look at this specific PR, but as it's more complicated I'll look closer, which takes a little. 😄 |
9cf89c9 to
9043954
Compare
|
@Totto16 Thanks for the feedback, that's a good idea. I'll revise the script and check it in as a separate pull request 👍 |
0ed87d9 to
3ed8e00
Compare
GNOME 51 moves event handling off actor vfuncs and onto Clutter actions,
gestures and key binding pools. The shell classes stopped overriding
`vfunc_*_event` and grew signal handlers instead. Those vfuncs still
exist on `Clutter.Actor`, so nothing fails to compile. The declarations
just stopped describing the shell.
Checked against gnome-shell at tag 51.beta, module by module, for every
declared name that changed between 50.4 and 51.beta:
appDisplay BaseAppView/AppDisplay._onScroll now takes the
ScrollController signal arguments; _onKeyPressEvent is a
binding pool closure
boxpointer _muteKeys is a KeyController, _muteInput a ClickGesture
calendar vfunc_scroll_event -> _onScroll
dialog vfunc_event -> KeyController
layout HotCorner.vfunc_leave_event is gone
messageList URLHighlighter motion/leave -> MotionController;
Message.vfunc_key_press_event -> _closeIfAllowed
messageTray _onNotificationKeyRelease -> binding pool
modalDialog vfunc_captured_event is gone
search new exported SearchEntry with activate-new-instance
slider scroll/key vfuncs -> _onScroll, _moveLeft, _moveRight
backlight SliderItem forwards vfunc_navigate_focus
volume _handleScrollEvent -> _onScroll + _handleScroll
switcherPopup key/scroll vfuncs -> _onKeyPress, _onModifierChange,
_onScroll
userWidget new showAvatar/hideAvatar
Everything added here carries `@version 51`, including the handlers
whose arguments 51 reshaped.
Checking these modules against 51.beta turned up a second group. These
names are absent at 50.4 as well, so gnome-shell dropped them in an
earlier cycle and they describe an API no supported shell has.
appFavorites _onFavsChanged
calendar _dndSwitch, _dndButton and the DoNotDisturbSwitch class
behind them (the switch moved to quick settings)
layout HotCorner._entered, _onCornerEntered, _onCornerLeft,
_setupFallbackCornerIfNeeded, _pendingLoadBackground
messageList URLHighlighter button press/release vfuncs,
NotificationMessage._getIcon/_onUpdated,
MediaMessage._secondaryBin/_closeButton
messageTray _onNotificationShow
popupMenu _motionEvent, _touchDragging
search _onPan
slider button press/release and touch vfuncs, startDragging,
_endDragging, _motionEvent, scroll
switcherPopup vfunc_button_press_event
Slider gains `step(nSteps)` in the same pass. It replaced
`scroll(event)`, `status/volume` calls it, and it was never declared. It
predates 51, so it carries no `@version` tag.
Only modules that GNOME 51 touched are in scope here. The rest of the
package has more of this; the PR description lists it.
Both are wrong at 50.4 as well, so neither is a 51 change. The new
check-shell-api script reported them.
layout Monitor.geometryScale is geometry_scale
switcherPopup itemEnteredHandler and itemRemovedHandler carry the
underscore: _itemEnteredHandler, _itemRemovedHandler
3ed8e00 to
d73143b
Compare
GNOME 51 moved event handling off actor vfuncs and onto
Clutteractions, gestures and key binding pools. The shell classes stopped overridingvfunc_*_eventand grew signal handlers instead. Those vfuncs still exist onClutter.Actor, so nothing fails to compile. The declarations just stopped describing the shell, quietly.#144 and #145 are merged, so this diff is only the three commits below.
First commit, sync with 51
Checked module by module against gnome-shell at tag
51.beta, for every declared name that changed between50.4and51.beta.appDisplayBaseAppView/AppDisplay._onScrollnow takes theScrollController::scrollarguments, and_onKeyPressEventbecame a binding pool closureboxpointer_muteKeysis aClutter.KeyControllerand_muteInputaClutter.ClickGesture, both werebooleancalendarvfunc_scroll_eventbecame_onScrolldialogvfunc_eventbecame aKeyControllerlayoutHotCorner.vfunc_leave_eventis gonemessageListURLHighlightermotion and leave became aMotionController,Message.vfunc_key_press_eventbecame_closeIfAllowedmessageTray_onNotificationKeyReleasebecame a binding pool closuremodalDialogvfunc_captured_eventis gonesearchSearchEntry, with itsactivate-new-instancesignalslider_onScroll,_moveLeft,_moveRightstatus/backlightSliderItemforwardsvfunc_navigate_focusto the sliderstatus/volume_handleScrollEventbecame_onScrollplus_handleScrollswitcherPopup_onKeyPress,_onModifierChange,_onScrolluserWidgetshowAvatarandhideAvatarEverything added carries
@version 51, per the convention (#156 renames the tag to@since). I applied it to the handlers whose arguments 51 reshaped as well,appDisplay._onScrollfor one, since the declared contract is the 51 one. Trim those if you read the tag more strictly.Two additions I left out, because those classes declare no members at all and one more private helper would not help anyone.
ActivitiesButton._toggleActioninpanel, declared asclass ActivitiesButton extends Button {}, andWindowPreview._onEnter/_onLeaveinwindowPreview, which declares exactly two members.Second commit, names 51 did not remove but an earlier release did
Checking those modules turned up a second group, absent at
50.4as well. They describe an API no supported shell has. Same files, so the same PR, but a separate commit, because it is a different claim and you may want to judge it separately.slideris the worst of them.startDragging,_endDragging,_motionEvent,scrolland three vfuncs all went away when the pan gesture landed, andstep(nSteps), the methodstatus/volumeactually calls, was never declared. That one I added. It predates 51, so it carries no@versiontag here. It came in with 49, and #157 tags it@since 49.Third commit, two members spelled wrong
Both are wrong at
50.4as well, so neither is a 51 change. Both modules are ones this PR touches anyway.layout:Monitor.geometryScaleisgeometry_scale.switcherPopup:itemEnteredHandleranditemRemovedHandlercarry the underscore,_itemEnteredHandlerand_itemRemovedHandler.What is still wrong after this PR
check-shell-api(#154) reports 53 stale declarations in 17 modules, 18 of them public. All of them are in modules GNOME 51 did not touch, so they are outside this PR's scope, but they are the same defect. #155 removes all of them. The list I put here earlier was written by hand from the first script and was short by 16, and it still named fourmessageListmembers that the second commit removes.There is a stale export too.
search.d.tsexportsMaxWidthBox, which upstream has kept module-private since at least50.4, and so do many other classes in the package. Removing an export breaks consumers, so I left it alone.check-shell-api --exportslists them.The part worth automating
The throwaway script I found this with is now a proper one in #154, as @Totto16 suggested below. It parses both sides with the TypeScript compiler API, keeps a baseline that can only shrink, and splits findings into public and private. Its README lists what it cannot see: it matches names, not shapes, so a method whose signature changed stays invisible. Every removal in this PR I verified by reading the upstream source, not by trusting the script.
Validation
build:types,prettier:check,validate:types,build:exampleandvalidate:exampleall pass locally.