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

workingDir should not be an @InputDirectory #61

Open
Alex-Vol-Amz opened this issue Mar 6, 2023 · 2 comments
Open

workingDir should not be an @InputDirectory #61

Alex-Vol-Amz opened this issue Mar 6, 2023 · 2 comments

Comments

@Alex-Vol-Amz
Copy link

I question the wisdom of the annotation in AbstractExecTask to declare workingDir as an input directory. This should be left to the consumers that use the tasks to declare additional file/directory inputs. The workingDir is likely to be undesirable and most often too unstable to be an incremental execution up-to-date criterion.

Can we remove the @InputDirectory from the code and let the users choose what might constitute a valid input file or directory?

@cgrabmann
Copy link

cgrabmann commented Aug 21, 2023

I just ran into seemingly exactly this issue while integrating springdoc-openapi-gradle-plugin into our own autoconfigure-gradle-plugin.

All the detailed information can be found in the 2 issues referenced above.

@psxpaul is there any intention on changing this? If so any preferred way? I would be willing to create a PR for it.

@jonbrew
Copy link

jonbrew commented Apr 22, 2024

Wanted to give my +1 since this is causing the build to require a large number of explicit dependencies to be set for the task when in reality it is just starting Xvfb and doesn't depend on any previous tasks.

    Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':bot-client:compileJava' as an input of ':bot-client:startXvfb'.
      2. Declare an explicit dependency on ':bot-client:compileJava' from ':bot-client:startXvfb' using Task#dependsOn.
      3. Declare an explicit dependency on ':bot-client:compileJava' from ':bot-client:startXvfb' using Task#mustRunAfter.
  
   
    Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':bot-client:compileKotlin' as an input of ':bot-client:startXvfb'.
      2. Declare an explicit dependency on ':bot-client:compileKotlin' from ':bot-client:startXvfb' using Task#dependsOn.
      3. Declare an explicit dependency on ':bot-client:compileKotlin' from ':bot-client:startXvfb' using Task#mustRunAfter.
    
    Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:compileTestKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':bot-client:compileTestKotlin' as an input of ':bot-client:startXvfb'.
      2. Declare an explicit dependency on ':bot-client:compileTestKotlin' from ':bot-client:startXvfb' using Task#dependsOn.
      3. Declare an explicit dependency on ':bot-client:compileTestKotlin' from ':bot-client:startXvfb' using Task#mustRunAfter.
    
    Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:shadowDistTar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':bot-client:shadowDistTar' as an input of ':bot-client:startXvfb'.
      2. Declare an explicit dependency on ':bot-client:shadowDistTar' from ':bot-client:startXvfb' using Task#dependsOn.
      3. Declare an explicit dependency on ':bot-client:shadowDistTar' from ':bot-client:startXvfb' using Task#mustRunAfter.
      
    Reason: Task ':bot-client:startXvfb' uses this output of task ':bot-client:shadowDistZip' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':bot-client:shadowDistZip' as an input of ':bot-client:startXvfb'.
      2. Declare an explicit dependency on ':bot-client:shadowDistZip' from ':bot-client:startXvfb' using Task#dependsOn.
      3. Declare an explicit dependency on ':bot-client:shadowDistZip' from ':bot-client:startXvfb' using Task#mustRunAfter.

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

3 participants