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

Initialize settings and keys to zero like values in globalSettings #25

Conversation

mdedetrich
Copy link
Contributor

So that this plugin plays better with other sbt plugins/IDE's/editors

)

override lazy val buildSettings = Seq(
validatePullRequest / includeFilter := "*",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eed3si9n Should scoped settings based on tasks also be initialized in globalSettings?

i.e. validatePullRequest is a TaskKey that this project introduces and includeFilter is a SettingKey contained in sbt.Keys

Copy link
Member

Choose a reason for hiding this comment

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

This is one weakness of task scoping. Task scoping is weakest, so often it's pointless to have a global or build-scoped task scoping for common keys like includeFilter. You can check this using inspect command, but if there's some other includeFilter in the subproject or Compile, it could end up picking that over the task-scoped one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case I think the PR is good to go unless you pickup on something else.

@mdedetrich mdedetrich merged commit a0383bd into sbt:main Jan 27, 2024
10 checks passed
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