cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
433 stars 60 forks source link

Tasks executed twice on update #381

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago
[14:18 erik@nix2 kobalt-test] > ./kobaltw update
            _  __          _               _   _   
           | |/ /   ___   | |__     __ _  | | | |_ 
           | ' /   / _ \  | '_ \   / _` | | | | __|
           | . \  | (_) | | |_) | | (_| | | | | |_ 
           |_|\_\  \___/  |_.__/   \__,_| |_|  \__|  1.0.45

  Regular compilation time: 13964 ms
Parallel build starting
     ╔══════════════════════╗
     ║ Building kobalt-test ║
     ╚══════════════════════╝
───── kobalt-test:update
            _  __          _               _   _   
           | |/ /   ___   | |__     __ _  | | | |_ 
           | ' /   / _ \  | '_ \   / _` | | | | __|
           | . \  | (_) | | |_) | | (_| | | | | |_ 
           |_|\_\  \___/  |_.__/   \__,_| |_|  \__|  1.0.45

  Regular compilation time: 13149 ms
Parallel build starting
     ╔══════════════════════╗
     ║ Building kobalt-test ║
     ╚══════════════════════╝

Thread report
╔════════════════════════════════════════╗
║  Time (sec) ║ Thread 11                ║
╠════════════════════════════════════════╣
║  0          ║ kobalt-test              ║
║  0          ║ kobalt-test (0)          ║
╚════════════════════════════════════════╝
PARALLEL BUILD SUCCESSFUL (0 SECONDS), sequential build would have taken 0 seconds

That's update not --update.

ethauvin commented 7 years ago

Two cases:

That's fixable, but I don't think it needs to be. The update task is the only task that is not project-related, with the exception of maybe copyVersionForWrapper. As a matter of fact, without looking at --tasks, most would think it actually updates the project.

I'm hard-pressed to find a compelling scenario were update would be used instead of --update. With that in mind, I'd suggest removing the update task altogether.

Thoughts?

cbeust commented 7 years ago

Fine by me. I only put it there because of pressure from some people who were used to the Gradle syntax. Removing it.

-- Cédric

On Thu, Apr 6, 2017 at 9:52 AM, Erik C. Thauvin notifications@github.com wrote:

Two cases:

-

./kobaltw --update

  • Kobalt sees the --update parameter; doesn't display the banner.
    • Performs the update.
    • Launches the new version; displaying the banner.
  • ./kobaltw update

  • No --update parameter; the banner is displayed.
    • Performs the update task,
    • Launches the new version; displaying the banner, again.

That's fixable, but I don't think it needs to be. The update task is the only task that is not project-related, with the exception of maybe copyVersionForWrapper. As a matter of fact, without looking at --tasks, most would think it actually updates the project.

I'm hard-pressed to find a compelling scenario were update would be used instead of --update. With that in mind, I'd suggest removing the update task altogether.

Thoughts?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cbeust/kobalt/issues/381#issuecomment-292236023, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFoomg2QqLttyucCef--bDp4awrXj0kks5rtRg-gaJpZM4MwnlO .