Open gastaldi opened 11 months ago
/cc @glefloch, @quarkusio/devtools
Additional Info:
JAVA_HOME=D:\Storage\.sdkman\candidates\java\current
JAVA_JDK_OPTIONS=-Djava.io.tmpdir=C:/TEMP -Dpolyglot.js.nashorn-compat=true -Dpolyglot.engine.WarnInterpreterOnly=false -Dlog4j2.Script.enableLanguages=javascript
But ultimately the fix is to str.replaceAll("\\\\","/")
or similar; and perhaps do some %20 encoding as well, because while I have c:\temp... the default temp dir is gonna be something like "C:\Users\John Smith\AppData\Roaming\Temp"
But ultimately the fix is to
str.replaceAll("\\\\","/")
or similar; and perhaps do some %20 encoding as well, because while I have c:\temp... the default temp dir is gonna be something like "C:\Users\John Smith\AppData\Roaming\Temp"
Where?
In what ever process generates the C:\TEMP\openrewrite-init15405549798719511192gradle file; which from a cursory search of the quarkus repo suggests this location (I searched for openrewrite-init)
and changing that to "rewriteFile", recipe.toAbsolutePath().toString().replaceAll("\\\\", "/"),
or potentially changing the whole thing into a URI or something, via Paths.get().toURI()
if the file() method in gradle supports such a thing. (Apache Commons IO has FilenameUtils.separatorsToUnix())
I am also experiencing this issue. Is there any update on it?
@n8s16 can you attach a simple reproducer?
Well, I didn't think you'd need a reproducer once I'd shown you the line in the code that presents the problem (as per my comments above).
@gastaldi : https://github.com/quotidian-ennui/quarkus-update-pwsh
This reproduces the problem directly in my current windows environment. i.e. quarkusUpdate hangs forever once it tries to run rewriteRun
when all it really needs to do is to change 2 entries in gradle.properties
Powershell Info
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 22621 3880
------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------
Build time: 2023-11-29 14:08:57 UTC
Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598
Kotlin: 1.9.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 21.0.3 (Amazon.com Inc. 21.0.3+9-LTS)
OS: Windows 11 10.0 amd64
@n8s16 can you attach a simple reproducer?
@gastaldi
I just created a new Quarkus project with version 3.8.5 and ran ./gradlew quarkusUpdate --stream=3.12. It seems to run indefinitely.
not sure trying to escape that path will help or trying to flip / vs . It needs to be treated as a path and quoted for the case if it has spaces.
In addition, as a workaround to update the Quarkus version, I manually changed the \
to /
in the generated init script and run the rewriteRun
.
If I switch to 'powershell' + the batch files...
Which then hangs forever... If you try to run the precise commandline again in powershell:
C:\TEMP\
->C:/TEMP/
then the script will run.Which implies to me that the problem is 'potentially on windows' and not just isolated to my WSL.
Originally posted by @quotidian-ennui in https://github.com/quarkusio/quarkus/issues/37715#issuecomment-1853989074