Giter VIP home page Giter VIP logo

Comments (4)

ammachado avatar ammachado commented on June 5, 2024 1

I did some digging on this one, and it seems that the problem is here: https://github.com/openrewrite/rewrite/blob/main/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java#L2072. I think it should consider the scope of the quotes.

from rewrite.

timtebeek avatar timtebeek commented on June 5, 2024

Replicated indeed with a test

@Test
void jenkinsFileWithLibrary() {
    rewriteRun(
      groovy(
        """
          @Library("jenkins-shared-libs@my_tag") _
          
          // artifactory standard pipeline
          artifactory()
          """,
        spec -> spec.path("Jenkinsfile")
      )
    );
}

What's interesting here is that it fails whenever the variable name assigned to the library occurs on the same line. If you remove _ from my_tag the test passes; same thing if you replace the last _ with foo. It's not specific to _ either. It fails just the same if you replace _ with a.

from rewrite.

ammachado avatar ammachado commented on June 5, 2024

Any updates on this one?

from rewrite.

timtebeek avatar timtebeek commented on June 5, 2024

No updates from my side, although I've also been off for a couple weeks, with some more travel ahead. It seems you've pinpointed the issue already. Are you considering any code changes there already? Or should we tag other folks while I'm out?

from rewrite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.