This PR nearly concludes the work on version 1.0 (there will be one more PR with some trivial renaming).
A new package structure became necessary for two reasons: First, the public API surface has been reduced to about 3 quarters of what it was in 0.19, leaving behind some skeleton packages, and second, the API has grown over 11 years in a way that too many things became weirdly scattered over time.
This description will focus on laika-core as the other modules are barely affected (they all have new .internal sub-packages, but only package-private types have moved there, meaning users of the API are not affected).
laika-core packages for 1.x
The number of public top-level packages has been reduced from 14 to 5:
laika.api - The root package remains unchanged, containing the main entry points for constructing parsers, renderers and transformers. There are three new sub-packages containing the APIs for extension authors which are not regularly used in application code or builds using the Laika plugin:
laika.api.format - APIs for developing custom input or output formats (e.g. MarkupFormat, RenderFormat).
laika.api.bundle - APIs for developing extensions or customizations (containing the main type ExtensionBundle).
laika.api.config - APIs for programmatically constructing Config instances or decoders and encoders.
laika.ast - The document AST, nearly unchanged (very few types have moved into or out of this package as part of the cleanup).
laika.config - This package is the new home for basic configuration types such as LinkConfig. These were previously scattered over multiple sub-packages (e.g. laika.rewrite.nav). These types are commonly used in basic builds or simple high-level API usage, meaning this change affects the highest number of users and might be best covered in a scalafix.
laika.format - Unchanged, still containing the small set of input and output formats that Laika supports out of the box (HTML, Markdown, etc.) This is the only package in laika-core other modules "contribute" to (e.g. EPUB from laika-io and PDF from laika-pdf).
laika.parse - Laika's parser combinator library, largely unchanged apart from removing some types from public APIs and into laika.internal.parse.
This PR nearly concludes the work on version 1.0 (there will be one more PR with some trivial renaming).
A new package structure became necessary for two reasons: First, the public API surface has been reduced to about 3 quarters of what it was in 0.19, leaving behind some skeleton packages, and second, the API has grown over 11 years in a way that too many things became weirdly scattered over time.
This description will focus on
laika-core
as the other modules are barely affected (they all have new.internal
sub-packages, but only package-private types have moved there, meaning users of the API are not affected).laika-core
packages for 1.xThe number of public top-level packages has been reduced from 14 to 5:
laika.api
- The root package remains unchanged, containing the main entry points for constructing parsers, renderers and transformers. There are three new sub-packages containing the APIs for extension authors which are not regularly used in application code or builds using the Laika plugin:laika.api.format
- APIs for developing custom input or output formats (e.g.MarkupFormat
,RenderFormat
).laika.api.bundle
- APIs for developing extensions or customizations (containing the main typeExtensionBundle
).laika.api.config
- APIs for programmatically constructingConfig
instances or decoders and encoders.laika.ast
- The document AST, nearly unchanged (very few types have moved into or out of this package as part of the cleanup).laika.config
- This package is the new home for basic configuration types such asLinkConfig
. These were previously scattered over multiple sub-packages (e.g.laika.rewrite.nav
). These types are commonly used in basic builds or simple high-level API usage, meaning this change affects the highest number of users and might be best covered in a scalafix.laika.format
- Unchanged, still containing the small set of input and output formats that Laika supports out of the box (HTML
,Markdown
, etc.) This is the only package inlaika-core
other modules "contribute" to (e.g.EPUB
fromlaika-io
andPDF
fromlaika-pdf
).laika.parse
- Laika's parser combinator library, largely unchanged apart from removing some types from public APIs and intolaika.internal.parse
.