question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to only build certain dependencies

See original GitHub issue

Expected Behavior

There sould be an posibility to build only certen Dependencies and not onyl all

Current Behavior

it is only possible to ignore some dependencies in dev mode

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 1.2.1

Affected components (if known)

The originated problem is that we have a shim for @babel/polyfill

specVersion: "1.0"
kind: extension
type: project-shim
metadata:
    name: babel-polyfills
shims:
    configurations:
        "@babel/polyfill": # name as defined in package.json
            specVersion: "1.0"
            type: module # Use module type
            metadata:
                name: "babel-polyfills"
            resources:
                configuration:
                    paths:
                        /lib/babel/: "dist"

when building we want to build this shim but not all other dependencies. that way we could just zip the dist folder and upload that to the SAP Gateway

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:29 (19 by maintainers)

github_iconTop GitHub Comments

5reactions
RandomBytecommented, Dec 17, 2019

In https://github.com/SAP/ui5-builder/pull/380 @kristian contributed a low level API that might resolve some use cases related to this topic.

The question now is how we expose this on a CLI and/or ui5.yaml level. I have compiled the following proposal which combines a new ui5.yaml configuration with new CLI parameters to hopefully allow solving most use cases. Any feedback would be greatly appreciated.

Proposal

New ui5.yaml configuration builder.requiredProjects

As proposed earlier, all listed projects are always built when the project is being built.

This is useful for scenarios where a dependency is exclusively used by the project itself (no reuse) and can therefore be viewed as being a part of the project.

New CLI parameters --include-dependency, --include-dependency-regexp, --exclude-dependency, --exclude-dependency-regexp

Similar to the already existing --include-task/--exclude-task parameters, they can include or exclude dependencies from the build.

This can be used to craft custom builds where some dependencies might not be required or are already given by the environment.

--all will act as an alias for --include-dependency="*" (including all dependencies). Omitting it is an alias for --exclude-dependency="*" (excluding all dependencies).

The [...]-regexp= variants allow specifying a regex that will be matched with the metadata.name property of the projects. This allows to include or exclude groups of dependencies based on their namespace.

Concept build selected dependencies
4reactions
RandomBytecommented, Jul 23, 2021

Released as part of UI5 CLI v2.12.0 🎉

Check the documentation here (ui5.yaml) and here (CLI).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Option to only build certain dependencies #386 - GitHub
Expected Behavior There sould be an posibility to build only certen Dependencies and not onyl all Current Behavior it is only possible to ......
Read more >
Maven – Optional Dependencies and Dependency Exclusions
The idea is that some of the dependencies are only used for certain features in the project and will not be needed if...
Read more >
Maven Modules + Building a Single Specific Module
While the -am command makes all of the projects required by a particular project in a multi-module build, the -amd or --also-make-dependents option...
Read more >
Build maven specific module only with dependencies
This recipe shows you how to build a specific Maven module in a multi module Maven project. It may be useful to reduce...
Read more >
Add build dependencies - Android Developers
Learn how to add build dependencies using the Gradle build system in Android Studio.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found