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

[BREAKING] Implement Project Graph, build execution #457

Merged
merged 7 commits into from
Jun 13, 2022
Merged

Conversation

RandomByte
Copy link
Member

  • Replace the JSON-object based dependency tree handling with a graph
    representation
    • Projects are now represented by classes with documented APIs
    • Projects can be accessed by extensions defining specVersion >=2.7
    • Speed up resolution of package.json dependencies
      • Make "ui5.dependencies" package.json configuration obsolete
  • Move build execution from ui5-builder to ui5-project
    • ui5-builder scope reduced top provides task implementations only
  • Build: Determine automatically whether a project-build requires
    dependencies to be built and build them
  • Build: Add new option 'createBuildManifest'. This will create a
    manifest file in the target directory that allows reuse of the
    build result of library and theme-library projects in other project
    builds (RFC0011)

This PR will need additional follow-up to add more test cases,
cleanup JSDoc and possibly add more features described in the RFCs.

This is a nicer version of
#394

Implements RFC0009: SAP/ui5-tooling#501
Implements RFC0011: SAP/ui5-tooling#612

BREAKING CHANGE:

  • normalizer and projectTree APIs have been removed. Use
    generateProjectGraph instead
  • Going forward only specification versions 2.0 and higher are supported
    • In case a legacy specification version is detected, an automatic,
      transparent migration is attempted.
  • Build:
    • The "dev" build mode has been removed
    • The task "generateVersionInfo" is no longer executed for
      application projects by default. You may enable it again using the
      includedTasks parameter

@RandomByte RandomByte force-pushed the ui5-project-3.0 branch 2 times, most recently from 265e4b6 to a28e27d Compare June 13, 2022 15:51
* Replace the JSON-object based dependency tree handling with a graph
representation
    * Projects are now represented by classes with documented APIs
    * Projects can be accessed by extensions defining specVersion >=2.7
    * Speed up resolution of package.json dependencies
        * Make "ui5.dependencies" package.json configuration obsolete
* Move build execution from ui5-builder to ui5-project
    * ui5-builder scope reduced top provides task implementations only
* Build: Determine automatically whether a project-build requires
  dependencies to be built and build them
* Build: Add new option 'createBuildManifest'. This will create a
  manifest file in the target directory that allows reuse of the
  build result of  library and theme-library projects in other project
  builds (RFC0011)

This PR will need additional follow-up to add more test cases,
cleanup JSDoc and possibly add more features described in the RFCs.

This is a nicer version of
#394

Implements RFC0009: SAP/ui5-tooling#501
Implements RFC0011: SAP/ui5-tooling#612

BREAKING CHANGE:
* normalizer and projectTree APIs have been removed. Use
generateProjectGraph instead
* Going forward only specification versions 2.0 and higher are supported
    * In case a legacy specification version is detected, an automatic,
      transparent migration is attempted.
* Build:
    * The "dev" build mode has been removed
    * The task "generateVersionInfo" is no longer executed for
      application projects by default. You may enable it again using the
      includedTasks parameter
Access to middlewareRepository is no longer necessary
Will create additional tests in follow-up PRs
Resolves depcheck issue for missing dependency to @ui5/project
RandomByte added a commit to SAP/ui5-builder that referenced this pull request Jun 13, 2022
Build execution is moved to ui5-project (see SAP/ui5-project#457).
Going forward, ui5-builder shall only provide task implementations and selected helper
modules like TaskUtil.

TaskUtil will provide a new `getProject()` function to custom tasks defining specVersion 2.7 and above.

BREAKING CHANGE:
* builder.js has been removed. Use ui5-project builder instead
* Tasks now rely on Project instances being available on Resources (see SAP/ui5-fs#381)
* TaskRepository#addTask has been removed. Custom tasks need to be added to the project graph instead
* TaskUtil#get/set/clearTag now requires a Project instance to be provided. Path strings are no longer sufficient
  and will cause an exception to be thrown

Co-authored-by: Matthias Osswald <mat.osswald@sap.com>
RandomByte added a commit to SAP/ui5-server that referenced this pull request Jun 13, 2022
Adapt to new Project Graph API (see SAP/ui5-project#457)

BREAKING CHANGE:
* Server now requires a Project Graph instance instead.
* Standard middleware now rely on Project instances being available on Resources (see SAP/ui5-fs#381)
* MiddlewareRepository#addMiddleware has been removed. Custom middleware need to be added to the project graph instead
RandomByte added a commit to SAP/ui5-cli that referenced this pull request Jun 13, 2022
Adapt to new ui5-project Project Graph and builder APIs: SAP/ui5-project#457

BREAKING CHANGES:
* Removed CLI option `--translator`. Use new option `--dependency-definition` to provide a file with
  static dependency information
* Removed `ui5 build dev` command
* Refactored `ui5 tree`: Removed `--full`, `--json` and `--dedupe` options

Co-authored-by: Matthias Osswald <mat.osswald@sap.com>
@RandomByte RandomByte merged commit 7a0c276 into next Jun 13, 2022
@RandomByte RandomByte deleted the ui5-project-3.0 branch June 13, 2022 18:22
@RandomByte RandomByte restored the ui5-project-3.0 branch June 13, 2022 18:29
flovogt pushed a commit to SAP/ui5-builder that referenced this pull request Jun 14, 2022
Build execution is moved to ui5-project (see SAP/ui5-project#457).
Going forward, ui5-builder shall only provide task implementations and selected helper
modules like TaskUtil.

TaskUtil will provide a new `getProject()` function to custom tasks defining specVersion 2.7 and above.

BREAKING CHANGE:
* builder.js has been removed. Use ui5-project builder instead
* Tasks now rely on Project instances being available on Resources (see SAP/ui5-fs#381)
* TaskRepository#addTask has been removed. Custom tasks need to be added to the project graph instead
* TaskUtil#get/set/clearTag now requires a Project instance to be provided. Path strings are no longer sufficient
  and will cause an exception to be thrown

Co-authored-by: Matthias Osswald <mat.osswald@sap.com>
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