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

Document the magic to make sequential inputTask #7166

Open
devpts00 opened this issue Mar 2, 2023 · 0 comments
Open

Document the magic to make sequential inputTask #7166

devpts00 opened this issue Mar 2, 2023 · 0 comments

Comments

@devpts00
Copy link

devpts00 commented Mar 2, 2023

Recently I had to make a composite inputTask that is a sequence of tasks and inputTasks. The composite inputTask was supposed to parse some input and then pass the parsed value to the nested inputTasks. There are some basic examples in documentation and googling did not offer much more than that. I had to literally perform a manual brute force attack trying to guess correct syntax that compiles and does what I wanted. The errors were cryptic. Macros expansions were unreadable. The result more or less is:

Keys.release := Def.inputTaskDyn {
  val bump = parserVersionBump.parsed.toString
  Def.sequential(
    Keys.buildNumberNext.toTask(bump),
    sbt.Keys.clean,
    Compile / sbt.Keys.compile,
    Compile / sbt.Keys.doc,
    Test / sbt.Keys.test,
    Keys.versioningTagNext.toTask(bump)
  )
}.evaluated

I confess I'm not a SBT guru, but still it must have been easier to understand what goes on behind the scene.

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

No branches or pull requests

1 participant