Skip to content

feat(project): Offer configPath property to workspace configs (workspace/1.1) - #1643

Open
maxreichmann wants to merge 10 commits into
mainfrom
offer-configPath-to-workspace-yaml
Open

maxreichmann wants to merge 10 commits into
mainfrom
offer-configPath-to-workspace-yaml

Conversation

@maxreichmann

@maxreichmann maxreichmann commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

This offers a configPath property to workspace dependency resolution entries as follows:

specVersion: workspace/1.1                      // new specVersion
metadata:
    name: default
dependencyManagement:
    resolutions:
        - path: ../test.library
          configPath: custom-config.yaml        // new customizable paths

(Introducing new specVersion workspace/1.1)


Other sub features:

  • Improve error handling when path is absolute
  • Forbid absolute paths for configPath
  • Allow relative paths for configPath (for path it's already allowed)

Closes: #1369
JIRA: CPOUI5FOUNDATION-1233

@maxreichmann maxreichmann changed the title Offer configPath property to workspace yamls (workspace/1.1) feat(project): Offer configPath property to workspace yamls (workspace/1.1) Oct 8, 2026
@maxreichmann maxreichmann changed the title feat(project): Offer configPath property to workspace yamls (workspace/1.1) feat(project): Offer configPath property to workspace configs (workspace/1.1) Oct 8, 2026
@maxreichmann
maxreichmann marked this pull request as draft October 8, 2026 14:21
@maxreichmann

Copy link
Copy Markdown
Member Author

Kindly asking @KlattG to review the documentation part of this PR already (Workspace.md).

(I didn't add this feature to the usual migrate-v5.md because we planned to downport to v4 too)

+ Forbid absolute paths for `configPath` property
+ Allow relative paths for `configPath` which are out-of-root (resolution dir)
Comment thread packages/project/lib/graph/Workspace.js Outdated
KlattG
KlattG previously approved these changes Oct 12, 2026

@KlattG KlattG left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@maxreichmann
maxreichmann force-pushed the offer-configPath-to-workspace-yaml branch 7 times, most recently from e286108 to 398ace8 Compare October 12, 2026 15:25
@maxreichmann
maxreichmann force-pushed the offer-configPath-to-workspace-yaml branch from 398ace8 to 5c857ed Compare October 12, 2026 15:42
@maxreichmann
maxreichmann marked this pull request as ready for review October 12, 2026 16:07
@maxreichmann
maxreichmann requested a review from a team October 12, 2026 16:07

@d3xter666 d3xter666 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.

Please, check the log when you try to build with this new validation/schema:

strict mode: missing type "object" for keyword "properties" at "ui5-workspace.json#/then/properties/dependencyManagement" (strictTypes)
strict mode: missing type "array" for keyword "items" at "ui5-workspace.json#/then/properties/dependencyManagement/properties/resolutions" (strictTypes)
strict mode: missing type "object" for keyword "required" at "ui5-workspace.json#/then/properties/dependencyManagement/properties/resolutions/items/then/not" (strictTypes)

This is from AJV's strict mode

Comment thread packages/project/lib/validation/schema/ui5-workspace.json Outdated
@maxreichmann

Copy link
Copy Markdown
Member Author

Please, check the log when you try to build with this new validation/schema:

strict mode: missing type "object" for keyword "properties" at "ui5-workspace.json#/then/properties/dependencyManagement" (strictTypes)
strict mode: missing type "array" for keyword "items" at "ui5-workspace.json#/then/properties/dependencyManagement/properties/resolutions" (strictTypes)
strict mode: missing type "object" for keyword "required" at "ui5-workspace.json#/then/properties/dependencyManagement/properties/resolutions/items/then/not" (strictTypes)

This is from AJV's strict mode

Resolved with 4ebdb73

Comment thread packages/project/lib/validation/schema/ui5-workspace.json Outdated
Comment on lines 156 to +157
return await this._getModulesFromPath(
this.#cwd, resolutionConfig.path);
this.#cwd, resolutionConfig.path, resolutionConfig.configPath);

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 modification leads to a bit strange behaviour that I'm not sure whtether is expected or not.
Here it is:

If you checkout the openui5-sample-app and use a ui5-worspaces.yaml in there to point to the openui5 monorepo locally and inside ui5-worspaces.yaml there is this configPath property with a custom ui5.yaml (it might have different name i.e. ui5-deployment.yaml) configuration, the solution will loop through all of the subpackages within openui5 monorepo and if such a custom file is missing somewhere, the build/serve will fail.

This means, that an external consumer will provide a path to a custom configuration in openui5 repo, expecting this custom configuration to be present everywhere.

A workaround I see is to point individually to every repo.

Co-authored-by: Yavor Ivanov <d3xter666@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Option to specify custom UI5 config for workspace dependency resolution

3 participants