Comments (4)
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.
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.
Any updates on this one?
from rewrite.
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)
- Enable Maven parallelism via `.mvn/maven.config` file HOT 6
- MethodNameCasing poorly implemented HOT 2
- ChangeType erroneously changes package of unrelated type HOT 3
- Java toolchains for Maven
- org.openrewrite.java.ChangePackage precise match HOT 7
- UpgradeDependencyVersion does not update dependency version whose value is defined via a property from the parent POM HOT 13
- Gradle wrapper upgrade recipe to 7.x+ is not updating "compile" dependencies to "implementation" in build.gradle files HOT 2
- Java 17 upgrade recipe is not updating Gradle wrapper to 7.3+ HOT 1
- Bug adding import to a list of imports containing duplicate imports
- UpgradeParentVersion sometimes adds redundant managed dependencies HOT 1
- Recipe fails silently HOT 1
- Inconsistent insertion order for `addMethodDeclaration` HOT 4
- yaml: DeleteProperty removes empty sequences
- Recognize recipes containing themself HOT 1
- GitProvenance is very slow getting committers on a large Git history HOT 2
- A way to get all dependency instead ResolvedDependency only HOT 3
- EmptyNewlineAtEndOfFile in groovy files ending with constructor and an empty line damages compilation by removing closing bracket HOT 1
- recipe does not exist HOT 1
- ShortenFullyQualifiedNames don't shorten FQN Annotations HOT 4
- java file "is not print idempotent" - case vs defaultcase HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rewrite.