-
Notifications
You must be signed in to change notification settings - Fork 46
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
new package structure for version 1.x #533
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
laika.factory.* -> laika.api.format.* laika.render.Formatter/TagFormatter -> laika.api.format.*
laika.config.* -> laika.api.config.* except for LaikaKeys
laika.bundle.* -> laika.api.bundle.* laika.directive.* -> laika.api.bundle.*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.