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

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

Open
BenReim opened this issue Feb 9, 2024 · 1 comment
Open

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

BenReim opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@BenReim
Copy link

BenReim commented Feb 9, 2024

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 
@BenReim BenReim added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Feb 9, 2024
@RandomByte
Copy link
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.

@RandomByte RandomByte added enhancement New feature or request and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Feb 9, 2024
@RandomByte RandomByte self-assigned this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants