Skip to content

exclude-task CLI option is ignored for some standard tasks #924

Description

@BenReim

Some task are being run even if included in the --exclude-task CLI option

Current Behavior

When running the build in a library project:

> ui5 build --clean-dest --exclude-task=minify,generateLibraryPreload

info ProjectBuilder Preparing build for project my.library
info Project 1 of 1: ❯ Building library project my.library
[...]
info my.library › Running task minify...
info my.library › Running task generateLibraryPreload...

Context

$ ui5 --version
3.8.0 

Activity

  1. added
    needs triage
    on Feb 9, 2024
  2. RandomByte commented on Feb 9, 2024

    @RandomByte
    Member

    Hey @BenReim,

    This is an unfortunate combination of two things. First, for CLI options that take multiple values, those values must be separated by a space. Second, in the case of the --include-task/--exclude-task options, we don't check whether the specified tasks actually exist.

    So to get your scenario working, replace the comma with a space like this:

    ui5 build --clean-dest --exclude-task=minify generateLibraryPreload

    I'll try and dig out the reasoning for not checking the provided task names. I remember that we had to remove this during a refactoring, as it caused trouble when building a project with dependencies. For example when building an application with dependencies, while excluding task generateLibraryPreload, the old checks would have complained about not knowing the generateLibraryPreload in the application project.

    I'm sure this can be improved, but I'll change this issue to an enhancement as it (unfortunately) works as designed.

  3. added and removed
    needs triage
    on Feb 9, 2024
  4. self-assigned this
    on Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ Proxy