Skip to content

Version 0.60.0 Changes

Vladimir Schneider edited this page Dec 20, 2019 · 6 revisions

⚠️ Upcoming release of 0.60.0 has breaking changes due to re-organization, renaming and clean up of implementation classes.

The extent of the changes and optimizations made it impossible to use the slow @Deprecated annotation with eventual removal.

  • Doc: BasedSequence, SegmentedSequence and BasedSequenceBuilder changes.
  • Doc: LineAppendable and using SequenceBuilder as an appendable target for it to accumulate rendered text with source information.
  • Break: split out generic AST utilities from flexmark-util module into separate smaller modules. IntelliJ IDEA migration to help with migration from 0.50.40 will be provided where needed if the package or class is changed. com.vladsch.flexmark.util will no longer contain any files but will contain the separate utilities modules with flexmark-utils module being an aggregation of all utilities modules, similar to flexmark-all

    • ast/ classes to flexmark-util-ast, any other classes which depend on Node will most likely be moved here.
    • builder/ classes to flexmark-util-builder
    • collection/ classes to flexmark-util-collection
    • data/ classes to flexmark-util-data
    • dependency/ classes to flexmark-util-dependency
    • format/ classes to flexmark-util-format, with dependency on Node changed to type parameter.
    • html/ classes to flexmark-util-html
    • mappers/ classes to flexmark-util-mappers, classes with dependency on Node will move to flexmark-util-node
    • mappers/ classes to flexmark-util-mappers
    • options/ classes to flexmark-util-options
    • sequence/ classes to flexmark-util-sequence
    • visitor/ classes to flexmark-util-visitor
    • Generic helper classes from module root:
      • DelimitedBuilder.java to flexmark-util-misc
      • FileUtil.java to flexmark-util-misc
      • ImageUtils.java to flexmark-util-misc
      • Immutable.java to flexmark-util-misc
      • Mutable.java to flexmark-util-misc
      • Pair.java to flexmark-util-misc
      • Paired.java to flexmark-util-misc
      • Ref.java to flexmark-util-misc
      • TemplateUtil.java to flexmark-util-misc
      • Utils.java to flexmark-util-misc
  • Break: delete deprecated properties, methods and classes

  • Add: org.jetbrains:annotations:15.0 dependency to have @Nullable/@NotNull annotations added for all parameters. I use IntelliJ IDEA for development and it helps to have these annotations for analysis of potential problems and use with Kotlin.

  • Break: refactor and cleanup tests to eliminate duplicated code and allow easier reuse of test cases with spec example data.

  • Break: move formatter tests to flexmark-core-test module to allow sharing of formatter base classes in extensions without causing dependency cycles in formatter module.

  • Break: move formatter module into flexmark core. this module is almost always included anyway because most extension have a dependency on formatter for their custom formatting implementations. Having it as part of the core allows relying on its functionality in all modules.

  • Break: move com.vladsch.flexmark.spec and com.vladsch.flexmark.util in flexmark-test-util to com.vladsch.flexmark.test.spec and com.vladsch.flexmark.test.util respectively to respect the naming convention between modules and their packages.

  • Break: NodeVisitor implementation details have changed. If you were overriding NodeVisitor.visit(Node) in the previous version it is now final to ensure compile time error is generated. You will need to change your implementation. See comment in the class for instructions.

    ℹ️ com.vladsch.flexmark.util.ast.Visitor is only needed for implementation of NodeVisitor and VisitHandler. Converting all anonymous implementations of VisitHandler to lambdas results in removal of all imports for Visitor.

    • Fix: remove old visitor like adapters and implement ones based on generic classes not linked to flexmark AST node.
    • Deprecate old base classes:
      • com.vladsch.flexmark.util.ast.NodeAdaptedVisitor see javadoc for class
      • com.vladsch.flexmark.util.ast.NodeAdaptingVisitHandler
      • com.vladsch.flexmark.util.ast.NodeAdaptingVisitor