Skip to content

More responsible skipping#163

Merged
armanbilge merged 11 commits into
typelevel:series/0.4from
armanbilge:fix/skip-if-irrelevant
Feb 11, 2022
Merged

More responsible skipping#163
armanbilge merged 11 commits into
typelevel:series/0.4from
armanbilge:fix/skip-if-irrelevant

Conversation

@armanbilge

Copy link
Copy Markdown
Member

Fixes #140, this time for real.

Two changes:

  1. Don't set skip := true for a whole project. Instead set it task-by-task, for tasks where skipping is known to be "safe".
  2. Make this feature opt-in. More builds broke than builds that actually need this. It's a good default in theory, but in practice there are too many complex interactions that makes stuff break in confusing ways.


private[sbt] def mkCommand(commands: List[String]): String = commands.mkString("; ", "; ", "")

private[sbt] def skipIfIrrelevant[T](task: TaskKey[T]) = {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I kept this private, but IMO it's worth exposing. For example http4s could use this for the unusedCompileDependenciesTest that was causing problems for the non-Scala 3 modules.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Although, many tasks are not natively skippable (like test).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, seems worth exposing.

@armanbilge
armanbilge merged commit 7add570 into typelevel:series/0.4 Feb 11, 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.

Skipping update requested, but update has not previously run successfully.

2 participants