Skip to content

Boy, and as the years go by

Compare
Choose a tag to compare
@Pante Pante released this 31 May 16:00
· 325 commits to stable since this release

This update focuses on introducing AOT-compiled command annotations in addition
to quality of life changes and retrofitting old classes/packages.

Big Ol' list of changes:

Annotations

Annotations has been undergone a few tweaks.

  • Add @Delegate
  • Add @VisibleForOverride
  • Add Filter
  • Add AnnotationProcessor.error(String)
  • Add AnnotationProcessor.warn(String)
  • Add AnnotationProcessor.note(String)
  • Add Messages
  • Change RetentionPolicy of annotations from RUNTIME to SOURCE
  • Change com.karuslabs.annotations.processors to com.karuslabs.annotations.processer
  • Remove com.karuslabs.annotations.filters - All the current filters are available in Filter

Commons

Numerous components of the project has been redesigned to reduce the overall API surface area while retaining functionality.
Commands annotations have also been rewritten to support AOT compilation and be less verbose.

Commands

  • Add com.karuslabs.commons.commands.aot.* packages to support AOT compilation
  • Add Dispatcher.register(Map<String, CommandNode<CommandSender>>)
  • Add DynamicExampleType
  • Add Nodes
  • Add PlatformMap
  • Add PulseListener
  • Add SpigotMap
  • Add SynchronizationListener
  • Add TreeWalker<T, R>
  • Add Type.listSuggestions(S, CommandContext<S>, SugegstionsBuilder)
  • Change Argument.addChild(CommandNode) and Literal.addChild(CommandNode) to not merge the current child's aliases and the new child's aliases
  • Change CartesianType from public to package private
  • Change Cartesian2DType from public to package private
  • Change Cartesian3DType from public to package private
  • Change com.karuslabs.commons.command.suggestions.ClientsideProvider to com.karuslabs.commons.command.ClientSuggestionProvider
  • Change Commands.alias(LiteralCommandNode<T>, String) to Literal.alias(LiteralCommandNode<T>, String)
  • Change Commands.from(Object) to Commands.resolve(Object)
  • Change Commands.from(Object, String) to Commands.resolve(Object, String)
  • Change Commands.executes(CommandNode<T>, Command<T>) to Commands.execution(CommandNode<T>, Command<T>)
  • Change DefaultableContext<T> to OptionalContext<T>
  • Change Dispatcher, DispatcherCommand, DispatcherMapper and Exceptions from com.karuslabs.common.command to com.karuslabs.common.command.dispatcher`
  • Change DispatcherMapper to NativeMapper
  • Change Executable<T> to Execution<T>
  • Change Execution.execute(OptionalContext<T>) to Execution.execute(T source, OptionalContext<T>)
  • Change Exceptions to package-private
  • Change Lexers to Readers
  • Change Mapper.otherwise(ComandNode<T>) to throw IllegalArgumentException instead of UnsupportedOperationException
  • Change Position2DType to PointType
  • Change Position3DType to PointType
  • Change Root to implement Mutable<CommandSender>
  • Change Root.addChild(...) to throw IllegalArgumentException if two commands with the same name are registered
  • Change Synchronizer methods annotated with EventListener to be package private
  • Change Type.listSuggestions(CommandContext<S>, SuggestionsBuilder) to forward to Type.listSuggestions(S, CommandContext<S>, SugegstionsBuilder)
  • Change Vector2DType to VectorType
  • Change Vector3DType to VectorType
  • Remove Literal.Builder<T>.alias(String) - use Literal.Builder<T>.alias(String...) instead
  • Remove Synchronization - this was a leaky abstraction and has been replaced by SynchronizationListener
  • Remove Tree<T, R> - replaced by TreeWalker<T, R>
  • Fix child commands not replaced when new child commands are added
  • Fix command aliases not being removed in Commands.remove(String)
  • Fix command aliases not being associated with their names in Bukkit's command system
  • Fix commands being added to Root even when unable to be registered in Bukkit's command system
  • Fix WorldType not parsing quoted world names with spaces
  • Remove Commands.remove(CommandNode<T>, String...) - this method was almost never used and posed a technical burden, use Commands.remove(CommandNode<T>, String) instead
  • Remove Commands.resolve(Object) - this method have been made redundant by the rewritten command annotations
  • Remove Commands.resolve(Object, String) - this method have been made redundant by the rewritten command annotations
  • Remove Nodes.Builder.then(Object, String) - this method have been made redundant by the rewritten command annotations
  • Remove com.karuslabs.commons.command.types.parser.VectorParser

Command Annotations

Commands annotations have been rewritten to support AOT compilation and be less verbose. Please refer to the wiki for
more information.

Concurrency

  • Add Context
  • Add Maybe<T>
  • Add Scheduler
  • Change Acquirable to Holdable
  • Change Acquirable.acquire() to Holdable.hold()
  • Change Acquirable.acquireInterruptibly() to Holdable.holdInterruptibly()
  • Fix longstanding issue with tasks scheduled with Scheduler and it's predecessor not running the correct number of times
  • Fix missing @Nullable annotations
  • Remove Eventual<T> - replaced by Maybe<T>
  • Remove EventualTask<T> - replaced by Maybe<T>
  • Remove Repeater - replaced by Scheduler
  • Remove Repetition - redundant as Scheduler now accepts a Consumer<Context>
  • Remove RunnableRepetition - redundant as Scheduler now accepts a Consumer<Context>

Items

  • Change BannerBuilder.pattern(Pattern) to BannerBuilder.patterns(Pattern...)
  • Change BannerBuilder.pattern(int, Pattern) to BannerBuilder.patterns(Collection<Pattern>)
  • Change BookBuilder.pages(List<String>) to BookBuilder.pages(Iterable<String>)
  • Change Builder(Builder<ItemMeta, ?>) from public to package-private
  • Change Builder(Material) from public to package-private
  • Change Builder.sef() from public to package-private
  • Fix CrossbowBuilder.projectiles(List<ItemStack>) not being consistent with Collection<?> and varargs methods in other Builders

Utility

  • Add Point
  • Add Type.box(Class<?>)
  • Add Type.unbox(Class<?>)
  • Add Type.VOID
  • Change `Trie.prefixed(String, Function<Entry<String, V>, T>, C) from public to package-private
  • Change boxed and unboxed values of TYPE constant in Type to Object
  • Change Vectors.LOCATION from public to package private
  • Change Vectors.Reduction<T> from public to package private
  • Change Vectors.rotate(Reduction<T>, T, double, double, double, float, float) from public to package-private
  • Change Vectors.VECTOR from public to package private
  • Fix incorrect equality comparison for TrieEntry
  • Remove Position - replaced by Point
  • Remove Type.of(Object)

Locale

  • Remove com.karuslabs.commons.util.locale.providers
  • Remove com.karuslabs.commons.util.locale.spi
  • Remove dependency on lingua-franca

Scribe

Error and warning messages have been overhauled to improve readability.

Scribe Annotations

  • Change Default.value from public to private
  • Change Version.version from public to private

Scribe Core

  • Change com.karuslabs.scribe.core.resolvers to com.karuslabs.scribe.core.parsers
  • Change Extractor to Resolver
  • Change Resolution to Environment
  • Change Resolver and related sub-classes to Parser and ...Parsers
  • Remove Messages

Scribe-Maven-Plugin

  • Add MavenEnvironment
  • Add ScribeMojo.valid(MavenEnvironment)
  • Change Messages to Console
  • Change MavenProcessor(Project, ClassGraph) to MavenProcessor(Environment, ClassGraph)
  • Change ScribeMojo.project() from protected to package-private
  • Fix failed execution caused by project's dependencies not getting resolved
  • Remove ScribeMojo.log(List<Message<Class?>>)

Scribe Standalone

  • Add StandaloneEnvironment

Others

  • Add CHANGELOG.md
  • Change the project's banner
  • Fix incorrect copyright header in files