Closed rkrisztian closed 3 years ago
According to the docs, it's also @Path
that conflicts with java.nio.file.Path
, so now we definitely got a bigger problem, IMO.
Totally agree, I am aiming to fix some of these pain points like this as part of the 3.x branch because I'm trying to package up all the breaking changes into one major release.
The aim is to get all the migration done in one fell swoop for users who want to move onto 3.x without breaking existing users code built against the 2.x line
i.e. don't expect this to ever get fixed for 2.x, will be addressed on 3.x
@rkrisztian Please take a look at PR #108 to see if that would be a sufficient change?
Really cool, thanks! Not only solves the original problem, the name changes also reflect the intent more (i.e. the annotations being about validation and not something else like an annotation-based type system like Gradle's InputDirectory
, which actually does validation too AFAIK, but you know, I digress anyway), way to go!
Annotation
@com.github.rvesse.airline.annotations.restrictions.File
has the same class name as a commonly used class in Java,java.io.File
. Chances are you will use the two types in the same file, which makes the current naming rather painful. It should rather be called something likeFileArgument
.Edit: The following points make my request have less importance:
Path
, some legacy code may not have switched to it yet.java.io.File
, which is less uglier.