Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-422

Script Caching gets stuck on EMPTY_SCRIPT state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.5.2
    • Fix Version/s: 0.6

      Description

      If a script has been identified as an empty script, then this information is cached and the script is never used again unless the cache is cleaned (even after contents are added). Also, truely empty scripts (with no content - even whitespace) cause an NPE.

      To reproduce this problem:

      1. create a build.gradle and add no content (not even \n)
      2. run gradle -t, you should get a NullPointerException
      3. add a single carriage return to the build.gradle
      4. run gradle -t, you should get an empty task list (which is correct)
      5. add the following to build.gradle: createTask('check')
      6. run gradle -t, you will get an empty task list (not correct) because it has been cached as empty and is now stuck that way

      I added testCases to DefaultCachePropertiesHandlerTest to cover both of these problems.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hans_d Hans Dockter
              Reporter:
              sappling Steve Appling
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: