Skip to content

refactor(builder): Run generateVersionInfo by default#1453

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

refactor(builder): Run generateVersionInfo by default#1453
maxreichmann wants to merge 8 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
    • +new test verifying exclusion/inclusion of generateVersionInfo
  • Docs
    • migrate-v5.md: new section explaining new behavior
    • Builder.md: changed generateVersionInfo from disabled to enabled in Standard Tasks table

Info

  • for Server:

Side tasks done

  • internal/documentation: Remove of npm script jsdoc (deprecated & not used in CI)
    • Remove now unused dep open-cli
  • docs: Replace hardcoded URLs (ui5.github.io/..) with dynamic links
  • docs: Replace dead "API Reference" links
    • Guide the reader to use the new sidebar menu
    • Add "📚" emoji to "API" in sidebar to mimic depr. API Reference button
  • docs: Add links to all Builder tasks in Standard Tasks table

@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!

| [generateBundle](../api/module-@ui5_builder_tasks_bundlers_generateBundle) | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | |
| [buildThemes](../api/module-@ui5_builder_tasks_buildThemes) | | | enabled | enabled |
| [generateThemeDesignerResources](../api/module-@ui5_builder_tasks_generateThemeDesignerResources) | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> |
| [generateVersionInfo](../api/module-@ui5_builder_tasks_generateVersionInfo) | enabled | *disabled* | *disabled* | *disabled* |

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.

If I see the diff correctly, the *disabled* for the types other than application have been added. Previously, the cells were empty, which means the task can never be executed for that project type (based on the build definition, like packages/project/lib/build/definitions/application.js), even if explicitly enabled by the caller.
I do not see code changes that change this situation, and I think the previous state still holds true: During a build, we only support running the generateVersionInfo for application projects, and it can not be enabled for other project types.

| [generateBundle](../api/module-@ui5_builder_tasks_bundlers_generateBundle) | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | *disabled* <sup>4</sup> | |
| [buildThemes](../api/module-@ui5_builder_tasks_buildThemes) | | | enabled | enabled |
| [generateThemeDesignerResources](../api/module-@ui5_builder_tasks_generateThemeDesignerResources) | | | *disabled* <sup>5</sup> | *disabled* <sup>5</sup> |
| [generateVersionInfo](../api/module-@ui5_builder_tasks_generateVersionInfo) | enabled | *disabled* | *disabled* | *disabled* |

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.

Should we add a foot-note for the server exception also here? This page is in context of the builder, but as we also run a build on the dev server, I think it would be worth noting here as well.

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.

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