-
Notifications
You must be signed in to change notification settings - Fork 172
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
Simplify Options and Attributes creation and usage #977
Comments
Totally agree! |
Given the scope, maybe we should mark this as branking change and 3.x.x release. |
Yes, this is definitely a breaking change.
Wdyt? |
For that what I had in mind is make Also added
|
This is not a new thing, but is something I think we haven't given much thought. And while going through the docs I see the docs are convoluted because of how the code works. It's basically "You can use X,Y,Z in this ways...but it's all for the same.".
Asciidoctor.convert
acceptsOptions
,OptionsBuilder
andMap<String,Object>
. Same applies forconvertDirectory
,convertFile
andconvertFiles
. This creates a lot of methods for the same and is not a bad thing on its own.What I think requires re-working is that those method's usage is not obvious to new users, specially when using IDE autompletion. Furthermore, Options has a public normal constructor, but OptionsBuilder has a static initializer plus the
get
andasMap
methods that return Options and Map.Also, we have
load
andloadFile
which only acceptMap<String,Object>
·To make things easier and more Java-ish wtyt if we...
Ascidoctor
methods only accept 1 type. I am thinking ofOptions
for the sake of abstraction.builder
method to Options. This will return an instance of OptionsBuillder.I am not sure if we should have a method that accepts map, one for free string-value for sure, accepting a map seems something out of convinience more than good design.
get
in OptionsBuilder tobuild
following common Java conventions.This should be marked for a 3.0 release since it may break integrations.
PS: same applies for
Attributes
,AttributesBuilder
...The text was updated successfully, but these errors were encountered: