Skip to content

Latest commit

 

History

History
177 lines (142 loc) · 17 KB

File metadata and controls

177 lines (142 loc) · 17 KB

Scope of Autofix

This document lists APIs that are not replaced or can't be replaced automatically by the UI5 linter at this time. These APIs require manual modification or special handling.

Note: This list is not exhaustive; there are more APIs that are currently not replaced automatically. This document provides examples of common APIs that require manual modification.

General Restrictions

  • Code outside of sap.ui.define/sap.ui.require - Most fixes require a new module import, which cannot be added automatically if the code is not inside a sap.ui.define or sap.ui.require block
  • Change from sync to async APIs - Requires restructuring code flow (often affecting multiple files), which cannot be done automatically
  • Complex API replacements - Some APIs require complex replacements with multiple API calls and new local variables, this is currently not supported
  • Context-dependent replacements - Some replacements depend on how the API is used in the broader context
  • Return value usage - Some return types or values differ, making automatic replacements impossible if the return value is used

jQuery.sap APIs

jQuery Plugins

  • All deprecated jQuery plugins - Currently not detected by UI5 linter and therefore cannot be fixed automatically, see #580
  • Missing plugin module dependencies - Not detected automatically, so the linter cannot add missing dependencies to the corresponding plugin modules, see #580

Global API Usage

  • Assignments to global variables - Cannot be replaced automatically
  • delete expressions on globals - Cannot be replaced automatically, see #668
  • Third-party modules - Usages of third-party modules (sap/ui/thirdparty/*) via globals (such as jQuery) are currently not replaced automatically

Module Imports

  • Pseudo module imports - Currently not implemented, see #715

Core APIs (See #619)

Many methods on the Core API (accessed via either the sap/ui/core/Core module import or via sap.ui.getCore()) cannot be replaced automatically:

Template APIs

Event Handling APIs

Error Handling APIs

Rendering APIs

Model APIs

Component/Application APIs

Other Core APIs

Core Configuration APIs (See #620)

Some methods on the Configuration API (accessed via either the sap/ui/core/Configuration module import or via sap.ui.getCore().getConfiguration()) cannot be replaced automatically:

Sync to Async API Changes

Currently, UI5 linter cannot automatically replace APIs that execute synchronously if their replacement would execute asynchronously (i.e. returns a promise). This is a general restriction as it would require restructuring the code flow. Examples include:

Library Loading

  • Core#loadLibrary
    • Only replaced with sap/ui/core/Lib.load() if async: true is explicitly specified
    • Synchronous library loading cannot be automatically replaced

Component Creation

  • Core#createComponent
    • Only replaced with sap/ui/core/Component.create() if async: true is explicitly specified
    • Synchronous component creation cannot be automatically replaced

Resource Bundle Loading

  • Core#getLibraryResourceBundle
    • Not replaced if any argument is a boolean with value true (which would make it return a promise)
    • Synchronous resource bundle loading cannot be automatically replaced with asynchronous

Other APIs

  • Component creation: sap.ui.component()Component.create()
  • View creation: sap.ui.view()View.create()
  • Fragment loading: sap.ui.xmlfragment()Fragment.load()
  • XMLView loading: sap.ui.xmlview()XMLView.create()
  • JSONView loading: sap.ui.jsonview()JSONView.create()
  • JSView loading: sap.ui.jsview()JSView.create()
  • HTMLView loading: sap.ui.htmlview()HTMLView.create()