-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Javadoc of ConfigurableFilePermissions.html#unix(int) #30369
Comments
https://kotlinlang.org/docs/numbers.html#literal-constants-for-numbers
With the Gradle Kotlin-DSL |
Maybe deprecate |
gradle/gradle#30369 Signed-off-by: Sebastian Davids <[email protected]>
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary. At the minimum, the introduced But we should consider if that method is really needed. |
@jbartok This issue was closed as completed and looks release-note worthy, but no PR with release-notes update has been found.
|
@jbartok This issue was closed as completed and looks release-note worthy, but no PR with release-notes update has been found.
|
The change is not release notes worthy (in my opinion). |
A couple of comments about the PR based on which this issue has been closed. First of all, the problem/concern is not entirely realistic. Anybody who has to deal with UNIX style file permissions should be aware, to some extent at least, of the fact that the int value only makes sense in octal. So we have decided not to completely remove the method. But, there is indeed some room for improvement, and that's what we did:
|
Expected Behavior
Prevent misuse of API.
It is easy to think that
unix(755)
isrwxr-xr-x
.https://docs.gradle.org/current/javadoc/org/gradle/api/file/ConfigurableFilePermissions.html#unix(int)
https://docs.gradle.org/current/javadoc/org/gradle/api/file/ConfigurableFilePermissions.html#unix(java.lang.String)
The description and the table suggest using a 3-digit number.
Current Behavior
gradle/platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/DefaultConfigurableFilePermissions.java
Lines 96 to 100 in 035834c
gradle/platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/AbstractFilePermissions.java
Lines 32 to 35 in 035834c
gradle/platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/DefaultConfigurableUserClassFilePermissions.java
Lines 38 to 42 in 035834c
gradle/platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/AbstractUserClassFilePermissions.java
Lines 33 to 35 in 035834c
Context
https://docs.gradle.org/current/userguide/working_with_files.html#sec:setting_file_permissions
https://docs.gradle.org/current/javadoc/org/gradle/api/file/FilePermissions.html
Both are OK but could be improved with a
WARNING
that if using a number it should be in octal format.The text was updated successfully, but these errors were encountered: