rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

Rename `@com.github.rvesse.airline.annotations.restrictions.File` #107

Closed rkrisztian closed 3 years ago

rkrisztian commented 3 years ago

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 like FileArgument.

Edit: The following points make my request have less importance:

rkrisztian commented 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.

rvesse commented 3 years ago

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

rvesse commented 3 years ago

@rkrisztian Please take a look at PR #108 to see if that would be a sufficient change?

rkrisztian commented 3 years ago

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!