You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Path is not usable and can cause hard-to-debug problems when passed to Gradle.
Expected Behavior
Passing Path to project.file or project.files should result in the same behavior as passing path.toFile().
Current Behavior
project.file: Raises an exception
project.files: Does nothing on initial call, hangs Gradle when getFiles() is called
Context
I prefer to use Path to File, but I need to remember to double-check all the variables I pass to Gradle to ensure no Path instances are being used. Otherwise, Gradle will hang as noted in the second bullet point above.
This project contains a single file, build.gradle with a singleFile task and a multiFile task. The singleFile task passes Paths.get('.') to project.file. The multiFile task passes Paths.get('.') to project.files. If everything is working properly, both tasks should print a path equivalent to ..
Thanks @kenzierocks for the detailed issue. Could you provide us with a build scan for each behavior: project.file and project.files. That would help us. I see the Path object doesn't seem to be supported as a valid path and it make sense to support those.
project.file: https://scans.gradle.com/s/osz7prvosbfyw project.files: Impossible to do, as the build does not appear to stop. Manually killing it does not produce a scan.
Path
is not usable and can cause hard-to-debug problems when passed to Gradle.Expected Behavior
Passing
Path
toproject.file
orproject.files
should result in the same behavior as passingpath.toFile()
.Current Behavior
project.file
: Raises an exceptionproject.files
: Does nothing on initial call, hangs Gradle whengetFiles()
is calledContext
I prefer to use
Path
toFile
, but I need to remember to double-check all the variables I pass to Gradle to ensure noPath
instances are being used. Otherwise, Gradle will hang as noted in the second bullet point above.Steps to Reproduce (for bugs)
https://github.com/kenzierocks/gradle-path-infinity-resolve
This project contains a single file,
build.gradle
with asingleFile
task and amultiFile
task. ThesingleFile
task passesPaths.get('.')
toproject.file
. ThemultiFile
task passesPaths.get('.')
toproject.files
. If everything is working properly, both tasks should print a path equivalent to.
.Your Environment
gradle -Dscan
: https://scans.gradle.com/s/r4ylr7jlg6klqThe text was updated successfully, but these errors were encountered: