Closed boghyon closed 2 years ago
Hello @boghyon , Thank you for sharing this finding. I've created an internal incident 2170321359. The status of the issue will be updated here in GitHub.
Regards, Iliana
@IlianaB Thanks for creating the incident. Would it be possible to reopen https://github.com/SAP/openui5/issues/3384 with the label enhancement?
I will first check with the team is it feasible.
Hey @boghyon ,
thanks for opening this issue here.
sap.ui.version
is a special parameter. It contains only the version of the sap.ui.core
library.
The UI5 version consumed by the CDN might differ from the version you get from sap.ui.version
. This caused already many confusions. We recommend to use the VersionInfo
API to get a detailed list of library versions.
sap.ui.require(
["sap/ui/VersionInfo"],
function (VersionInfo){
VersionInfo.load().then(
function(info) {
console.log(info);
});
});
@codeworrior please correct me, but I guess the usage of sap.ui.version
won't be further promoted.
Correct @flovogt , due to the potential misunderstandings that you describe, we don't want to promote sap.ui.version
and won't make it public (it is intentionally not public).
@codeworrior @flovogt Thanks for letting us know.
Somewhat related (please correct me if I'm wrong): the sap/ui/VersionInfo
currently relies on the generated sap-ui-version.json
file which in typical cases contains the framework version with the correct patch level (in SAPUI5 cases). Standalone apps, however, report the app version instead. Related enhancement request: https://github.com/SAP/ui5-tooling/issues/353.
AFAIK, i.e. there is currently no reliable way for standalone SAPUI5 apps to determine the correct patch version.
@boghyon this is correct.
URL (minimal example if possible): https://openui5nightly.hana.ondemand.com/api/sap.ui
Currently, the API reference page of the namespace
sap.ui
doesn't mentionsap.ui.version
. I believe it's because the JSDoc tags@public
,@readonly
, and@name sap.ui.version
are missing at: https://github.com/SAP/openui5/blob/8d2e7dc6a1cfad10e972f631fdea38115ab34a05/src/sap.ui.core/src/sap/ui/Global.js#L71-L79This would result in a new section "Fields" in the
sap.ui
API reference page (similar to https://openui5nightly.hana.ondemand.com/api/sap.ui.core.Component.registry#properties) which doesn't exist there yet.According to the section "Don't use references to global names",
sap.ui.version
is one of the exceptions that can be still used via the global name.