Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Add 'sap.ui.fl' dependency to manifest.json #318

Merged
merged 3 commits into from
Aug 28, 2019

Conversation

dstork
Copy link
Contributor

@dstork dstork commented Aug 27, 2019

If changes are present during runtime, the 'sap.ui.fl' dependency should be added to the manifest.json so the changes contained in the changes bundled can be applied to the application

If changes are present during runtime, the 'sap.ui.fl' dependency should be added to the manifest.json so the changes contained in the changes bundled can be applied to the application
@CLAassistant
Copy link

CLAassistant commented Aug 27, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Aug 27, 2019

Coverage Status

Coverage increased (+0.01%) to 86.33% when pulling ea4b15b on dstork:master into 6528053 on SAP:master.

@@ -20,6 +24,42 @@ module.exports = function({workspace, options}) {
pathPrefix = `/resources/${options.namespace}`;
}

function updateJson(data) {
const mLibs = data["sap.ui5"].dependencies.libs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't it happen that there's no dependencies/libs section yet in the manifest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least if createManifest > createSapUi5 > create > depdenencies is running / the creator is doing everything right, it should be fine.
In general the dependencies is flagged as mandatory while I only found a "have to be filled ... for ui5 apps" for the libs section.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safety first... now within the mandatory part we always have the section not explicitly mentioned as mandatory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As most mandatory sections are not checked at runtime, I would expect the tooling to do the same. It should not expect that the given manifest is valid w.r.t. the schema.

Copy link
Member

@codeworrior codeworrior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess with more time, I would have asked for some more changes, e.g.

  • move tests related to generateFlexChangesBundle.js into a dedicated module
  • try to preserve the indent of the original manifest.json
  • add another test case for Lonwyr's last commit

But we can improve this in a later release.

Please remember to squash the commits into a single one before merging.

@codeworrior codeworrior merged commit a8edff4 into SAP:master Aug 28, 2019
@@ -20,6 +24,42 @@ module.exports = function({workspace, options}) {
pathPrefix = `/resources/${options.namespace}`;
}

function updateJson(data) {
const mLibs = data["sap.ui5"].dependencies.libs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As most mandatory sections are not checked at runtime, I would expect the tooling to do the same. It should not expect that the given manifest is valid w.r.t. the schema.

log.verbose("Writing flexibility changes bundle");
await updateFLdependency();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Processors return an array of resources, which should all be written to the workspace, although (currently) in this case it always returns one resource.

But updating the manifest should only happen once, right? So I would expect it to be done after the Promise.all.

"title": "{{title}}"
}
}
{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.i","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"},"sap.ui5":{"dependencies":{"libs":{"sap.ui.layout":{},"sap.ui.core":{},"sap.m":{},"sap.ui.fl":{}}}}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is expected. When modifying the manifest IMO, it should still be formatted, preferably with the same indentation as before, but I think tabs should be fine.

@matz3
Copy link
Member

matz3 commented Aug 28, 2019

See #319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants