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

[FEATURE] flexChangesBundler: Add flexibility-bundle.json #353

Merged
merged 7 commits into from
Nov 7, 2019

Conversation

thuyboehm
Copy link
Contributor

@thuyboehm thuyboehm commented Oct 15, 2019

[INTERNAL] If minUI5Version >= 1.73 flexibility-bundle.json is create indeed of changes-bundle.json
If minUI5Version < 1.73 and there are no control variant changes changes-bundle.json is create.
If minUI5Version < 1.73 and there are control variant changes the build will throw an error.

@CLAassistant
Copy link

CLAassistant commented Oct 15, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Oct 15, 2019

Coverage Status

Coverage increased (+0.2%) to 90.276% when pulling 7d77213 on thuyboehm:addFlexBundleJson into b2d8269 on SAP:master.

// if there are ctrl variant and minUI5Version < 1.72 need to update minUI5Version to 1.72.0
if (hasVariant && !hasFlexBundleVersion) {
log.verbose("minUI5Version < 1.72, updated it to 1.72.0");
data["sap.ui5"].dependencies.minUI5Version = "1.72.0";
Copy link
Member

Choose a reason for hiding this comment

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

IMHO, the tooling must not change manifest metadata on the fly, it should rather stop with an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I change the logic.
The build will stop when the minUI5Version is below 1.72 and there are control variants in the change folder

@RandomByte
Copy link
Member

Please prefix your commit message with [INTERNAL] as per our Contributing Guidelines

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.

Basically okay with me. Most comments are style comments (a matter of taste). The most important point IMO is the missing explanation of the new format. What files are stored in what array etc.

lib/processors/bundlers/flexChangesBundler.js Show resolved Hide resolved
lib/processors/bundlers/flexChangesBundler.js Outdated Show resolved Hide resolved
lib/processors/bundlers/flexChangesBundler.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateFlexChangesBundle.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateFlexChangesBundle.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateFlexChangesBundle.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateFlexChangesBundle.js Outdated Show resolved Hide resolved
lib/processors/bundlers/flexChangesBundler.js Outdated Show resolved Hide resolved
@codeworrior codeworrior self-requested a review November 7, 2019 13:01
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.

LGTM now.

@RandomByte
Copy link
Member

RandomByte commented Nov 7, 2019

Had a rough look, lgtm. @codeworrior feel free to merge 👍

@RandomByte
Copy link
Member

Just wondering, is this an [INTERNAL] or a [FEATURE] change?

@RandomByte RandomByte changed the title [INTERNAL] add flexibility-bundle.json [FEATURE] flexChangesBundler: Add flexibility-bundle.json Nov 7, 2019
@RandomByte RandomByte merged commit cecc97d into SAP:master Nov 7, 2019
@RandomByte
Copy link
Member

Released as part of UI5 CLI v1.12.0 🎉

@shahzeb79
Copy link

Hi All,
I get this Error.
Error: There are some control variant changes in the changes folder. This only works with a minUI5Version 1.73.0. Please update the minUI5Version in the manifest.json to 1.73.0 or higher

What should be done to avoid this error?

@codeworrior
Copy link
Member

@shahzeb79 I would say, the error message is quite instructive, isn't it?

Or aren't there any variant changes in the app or does it already use a min version of 1.73.0 or higher? Can you please point us to the app's sources or to a build log, for further analysis?

@shahzeb79
Copy link

shahzeb79 commented Jul 20, 2020

Hi,
Our app dont have hardcoded version for minUI5Version. <removed internal URL from public GitHub - RandomByte>

Here is the link for the app having this error. <removed internal URL from public GitHub - RandomByte>

@codeworrior
Copy link
Member

I see. I guess the Maven property ${sap.ui5.dist.version} is not resolved during build execution before the flexBundler reads and analyzes the manifest.json.

Is Maven filtering (or an equivalent) active in your build before the ui5 tooling is executed? As the project resources rely on Maven properties, such a step is required anywhere. The ui5 tooling to my knowledge only can replace the version and copyright properties. @RandomByte, @matz3 or can the set of properties (and their values) be configured somehow?

@RandomByte
Copy link
Member

The ui5 tooling to my knowledge only can replace the version and copyright properties. @RandomByte, @matz3 or can the set of properties (and their values) be configured somehow?

No. Of course you could add replacement for other strings in a custom middleware however.

@shahzeb79
Copy link

@codeworrior no we dont do any mvn thing before ui5tooling now. Do you think we have to issue some mvn command ?

@matz3
Copy link
Member

matz3 commented Jul 22, 2020

No. Of course you could add replacement for other strings in a custom middleware however.

But as there's no way to write back the modified resources it's not possible for the flexChangesBundler to receive it.
So I think it's not straight-forward to solve.

@codeworrior no we dont do any mvn thing before ui5tooling now. Do you think we have to issue some mvn command ?

You might process the resources via maven (with filtering) and then use the "target" folder for running the UI5 Tooling and karma tests

@RandomByte
Copy link
Member

But as there's no way to write back the modified resources it's not possible for the flexChangesBundler to receive it.

I think I meant custom task. There this should be possible, shouldn't it?

@matz3
Copy link
Member

matz3 commented Jul 22, 2020

I think I meant custom task. There this should be possible, shouldn't it?

Yes, there it's possible.

@shahzeb79
Copy link

@matz3 Yes we can run mvn to generate target

@RandomByte
Copy link
Member

@shahzeb79 have you seen my comment in your other issue: SAP/ui5-tooling#245 (comment) ?

I think what @matz3 suggests might be a good workaround but the better solution would be the outcome of SAP/ui5-tooling#245 (comment) where you can work with flex changes directly from source.

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.

7 participants