Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-544

Save the ClassNode AST by default

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Currently MetaClass.getClassNode() tries to recompile a given Groovy class to gain access to the AST. This doesn't work when using groovy scripts that are not on the classpath (eg. GroovyShell) and you would have to do it yourself.

      With the following patch the ClassNode of every compiled class will be saved and available for access later.

      One example where a missing ClassNode causes problems:

      groovy.sql.DataSet when used inside a GroovyShell script doesn't work since the AST will not be found to walk the closure.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            blackdrag Jochen Theodorou
            maniax Thomas Heller
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment