Skip to content
Home » GNOME 45 Will Break Extensions Backward Compatibility

GNOME 45 Will Break Extensions Backward Compatibility

The GNOME 45 release will impact your favourite extensions, and extension developers need to port their extensions to make it work.

By now, you must have heard about it. In a significant shift, GNOME Shell is making the transition from its custom import system to standard JavaScript modules (ESM) with the GNOME 45 release (upcoming).

This move promises to improve code organization and compatibility with modern JavaScript practices, but it also has some consequences that might affect your GNOME experience.

Initially designed to add interactivity to web pages, JavaScript was not initially equipped to handle large-scale applications split across multiple files. This limitation led to the development of custom import systems in various JavaScript environments, including GNOME’s GJS. As a result, developers and tools faced challenges when transitioning between different JavaScript ecosystems.

However, the defining moment arrived in 2015 with ECMAScript 6 (ES6) module standardisation. These modules provided a well-defined, widely-supported syntax that all major JavaScript engines embraced. Although GJS began supporting ESModules in 2021, porting the entire GNOME Shell to this new system was a substantial undertaking.

Modules vs. Legacy Imports

Now, here’s where things get a bit tricky. Modules and legacy imports are fundamentally incompatible in practice. Modules load differently than scripts; some critical statements, such as ‘import’ and ‘export,’ are only valid within modules. This means that attempting to import a module with the legacy system will result in a syntax error if the module utilizes these statements.

So, what does this mean for you, the GNOME user?

Starting with GNOME 45, extensions developed for older GNOME versions will not work. Conversely, extensions meticulously adapted to function with GNOME 45 will not function in older GNOME releases.

However, all is not lost! If you are a developer and want to continue supporting both older and newer GNOME versions, you’ll need to upload different versions of your extensions to extensions.gnome.org for pre- and post-45 support.

This might be a lot of work for the developers.

The GNOME community is here to assist the developers during this transition. There is a comprehensive porting guide available with detailed information to help developers update their extensions for GNOME 45. Additionally, an active extension community is ready to lend a hand on platforms like Matrix and Discourse, making the process of porting to the new import system more accessible and smoother.

For users, you need to wait until the porting is done for those specific extensions that target pre-45 releases as well in their code. So, when GNOME 45 releases (via Fedora 39, Ubuntu 23.10), disable extensions before the upgrade.

Via blog post, ItsFOSS news

Recent articles from DebugPoint.com

Tags:
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments