Skip to content

refactor(builder): Run generateVersionInfo by default#1453

Draft
maxreichmann wants to merge 9 commits into
mainfrom
run-generateVersionInfo-by-default
Draft

refactor(builder): Run generateVersionInfo by default#1453
maxreichmann wants to merge 9 commits into
mainfrom
run-generateVersionInfo-by-default

Conversation

@maxreichmann

@maxreichmann maxreichmann commented Jul 16, 2026

Copy link
Copy Markdown
Member

JIRA: CPOUI5FOUNDATION-1157


What has been done?

  • Exclusion of task generateVersionInforemoved
    • now it will be executed by default for every build of project type application (default, jsdoc, self-contained)
  • Tests refactored accordingly
  • Docs
    • migrate-v5.md: new section explaining new behavior
    • Builder.md: changed generateVersionInfo from disabled to enabled in Standard Tasks table

Info

  • for Server:

@maxreichmann maxreichmann changed the title refactor(builder): Remove default exclusion of "generateVersionInfo" refactor(builder): Remove default exclusion of generateVersionInfo Jul 16, 2026
@maxreichmann maxreichmann changed the title refactor(builder): Remove default exclusion of generateVersionInfo refactor(builder): Run generateVersionInfo by default Jul 20, 2026
@matz3

matz3 commented Jul 20, 2026

Copy link
Copy Markdown
Member

We should also check how this now relates to the versionInfo middleware. My assumption would be that we need to keep the middleware to serve the file for non-application projects (and when the task was skipped?). For application projects, we should be able to just serve the file from the application build output. This should at least be tested, confirmed and documented.

`+` docs: Replace hardcoded URLs (ui5.github.io/..) with dynamic links
`+` docs: Add links to all Builder tasks in Standard Tasks table
`+` refactor: Remove "jsdoc" npm script (+remove unused dep `open-cli`)
@maxreichmann
maxreichmann force-pushed the run-generateVersionInfo-by-default branch from 130029c to 0d3d9db Compare July 21, 2026 11:29
@maxreichmann
maxreichmann force-pushed the run-generateVersionInfo-by-default branch 3 times, most recently from 8125892 to f354410 Compare July 22, 2026 09:51
(versionInfo middleware still runs -> sap-ui-version.json is generated)
`+` add test verifying exclusion
`+` adjust docs stating this exclusion
@maxreichmann
maxreichmann force-pushed the run-generateVersionInfo-by-default branch from f354410 to b6ca355 Compare July 22, 2026 10:11
@maxreichmann

Copy link
Copy Markdown
Member Author

Update:

  • generateVersionInfo is now excluded from server builds (for normal builds, it's executed by default).
  • Tests are added and existing ones are adjusted.
  • Docs are adjusted.
    --> Main part is done and ready for review.

"Side tasks done": I'm also fine to move those changes out to another PR if this eases the review process.

@matz3 matz3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Side tasks done": I'm also fine to move those changes out to another PR if this eases the review process.

Yes, I think that would help with reviewing the docs changes. Thanks for looking into that!

Comment thread internal/documentation/docs/pages/Builder.md Outdated
Comment thread internal/documentation/docs/pages/Builder.md Outdated
ui5DataDir,
}) {
// Explicitly exclude task "generateVersionInfo" for Server builds
// because middleware "versionInfo" will generate the version info anyways.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This handling should be moved to into the @ui5/server code in packages/server/lib/server.js, which does provide an HTTP server with the mentioned versionInfo middleware.

This @ui5/project API only returns the BuildServer, which is the underlying functionality, but it is not opinionated about the integration, and does not know about the versionInfo middleware.

This means that the BuildServer integration tests are likely unaffected by this change, which is fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This means that the BuildServer integration tests are likely unaffected by this change, which is fine.

I understand why to move the logic to server.js (originally I also thought about this). But isn't it also fine in ProjectGraph.js? I mean, it'd be in the dedicated serve() function outside of build() and we would have more realistic tests in BuildServer.integration.js. With the other way, the tests are logically correct but tend to be more unit test like.

@maxreichmann
maxreichmann force-pushed the run-generateVersionInfo-by-default branch 2 times, most recently from b520126 to 94494b7 Compare July 22, 2026 14:44
@maxreichmann
maxreichmann force-pushed the run-generateVersionInfo-by-default branch from 94494b7 to cd38857 Compare July 22, 2026 14:45
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.

2 participants