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

feat: tag assembly task #485

Merged
merged 2 commits into from
Nov 10, 2022
Merged

feat: tag assembly task #485

merged 2 commits into from
Nov 10, 2022

Conversation

ingarabr
Copy link

@ingarabr ingarabr commented Nov 7, 2022

Add a tag for the assembly tasks. This can be used to restrict resource usages.

Why do we need this?

Version 2 of sbt-assembly uses more resources. This is problematic when executing assembly on a multi-module project causing different types of errors. I've encountered memory and to many open files issue. Adding a tag gives the user of the plugin the option to restrict concurrent executions with Global / concurrentRestrictions += Tags.limit(Assembly.assemblyTag, 1)

Things to consider

  • Should we reuse some of the existing tags? Sbt has defined both cpu, memory and disk tags.
  • Should the plugin have a default limit on the tag?

Add a tag for the assembly tasks. This can be used to restrict
resource usages.
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@eed3si9n
Copy link
Member

eed3si9n commented Nov 7, 2022

Should the plugin have a default limit on the tag?

I think it's a good idea to put default limit on 1.

This to prevent the task to fail due to resource starvation.
For instance cpu and to many open files. The issue will most
likely occur on multi-module project where we do assembly on
more than one project. Setting the default to one will ensure
that it will work and can be overridden if needed.
@ingarabr
Copy link
Author

ingarabr commented Nov 8, 2022

I agree that a default limit of 1 can be a good default. Please take a look at a04849b

@eed3si9n eed3si9n merged commit b074c40 into sbt:develop Nov 10, 2022
@ingarabr ingarabr changed the title feat: tag assemly task feat: tag assembly task Nov 10, 2022
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