Skip to content
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

fix(deps): update configurate3 to v4 (major) #244

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 28, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.spongepowered:configurate-gson 3.7.3 -> 4.1.2 age adoption passing confidence
org.spongepowered:configurate-yaml 3.7.3 -> 4.1.2 age adoption passing confidence
org.spongepowered:configurate-hocon 3.7.3 -> 4.1.2 age adoption passing confidence

Release Notes

SpongePowered/Configurate (org.spongepowered:configurate-gson)

v4.1.2: Configurate v4.1.2

Compare Source

  • core: Fix conversion of zero-value doubles to floats (#​206)
  • core: Optimize TypeSerializerCollection.get based on end-user profiling
  • core: Fail fast when values of an incorrect type are set (#​210)

v4.1.1: Configurate v4.1.1

Compare Source

  • Hotfix: Restore ability to write to final fields with the object mapper (#​200)

v4.1.0: Configurate v4.1.0

Compare Source

This is a minor feature release to the Configurate v4 series that addresses a variety of bugfixes, small API additions, and Javadoc tweaks that have built up in the months since the 4.0.0 release.

Thanks to forresthopkinsa, jpenilla, and ItsTehBrian for their contributions to this release.

Added
  • core: NodePath.plus added to combine paths
  • core: AbstractListChildSerializer is now part of Configurate's public API
  • core: Added methods on ConfigurationLoader to load/save from strings
  • core: Temporary files for writing are now prepended with a . so they appear hidden in file viewers
  • core: Multi-release jar functionality is now used to take advantage of some collections and reflection API only available in newer Java versions
  • core: Added analysis annotations to indicate contracts in ConfigurationOptions and AbstractConfigurationLoader
  • core: Added ConfigurationNode.require methods for cases where a return value is known to be non-null, to avoid nullabilty warnings in IDEs
  • core: Added flags field to the @Matches constrant annotation to pass through Pattern flags
  • gson: Added serializers for JsonElement and its subtypes (accessible via GsonConfigurationLoader.gsonSerializers())
  • kotlin: Add supplier-defaulted get() extensions to ConfigurationNode
Fixed
  • core: Retry closing in AtomicFiles, to attempt better handling of Windows file locking
  • core: Handling of integer keys in the map serializer (#​184)
  • core: Improve error messages when trying to get the object mapper to construct an object instance that it is unable to.
  • core: Fix handling of absent primitive fields in the record object mapper
  • core: Fix erasing target files when attempting to save a clearly invalid node (#​189)
  • core: Sets of enums are now deserialized as EnumSets rather than HashSets
  • core: Add missing primitive types to Types.box/unbox
  • core: Separate the concepts of a null value and being virtual, to correct handling of null-valued non-virtual nodes (#​187)
  • core: Correctly handle configuration files stored within symlinked directories
  • core: Fixed improper floating-point precision testing (#​198)
  • hocon: Ensure leading spaces in comments are stripped
  • kotlin: Correct the non-defaulted get method to use the appropriate Java overload of get (#​185)
Deprecated
  • kotlin: The NodePath.plus extension function has been deprecated since it is replaced by the plus method in NodePath itself.

v4.0.0: Configurate v4.0.0

Compare Source

Welcome to a new major release of Configurate! We've taken the time to review a lot of longstanding pain points, so there are a variety of breaking changes in this release. Some of the behaviour changes can be subtle, so please read the changelog carefully.

To ease upgrading for IntelliJ users, a migration XML file has been attached to this release. This can be imported as IDE settings, or placed in your $INTELLIJ_HOME/migration folder (in %APPDATA%/Roaming/JetBrains on Windows).

New features
  • Added TypeSerializers for Path and File
  • Added new registerExact method to TypeSerializerCollection.Builder to register serializers for only a single type and not its subtypes.
  • Added Java 14+ record support and many other features to the object mapper (see below for more details).
  • Added new submodules to integrate with Mojang's DataFixerUpper library (versions 2-4), with a DynamicOps implementation, DataFix-using transformations, and conversions between Codecs and TypeSerializers.
  • Make more extensive use of a unified NodePath across the whole API, for operations like resolving nodes and specifying transformation paths.
  • Redesigned the exception structure of the project, so all configuration operations throw exceptions that extend from ConfigurateException, which provide more machine-readable metadata. ConfigurateException extends IOException, so existing error handling may not break.
  • Add new NodeFactory interface to provide a common view for creating configuration nodes.
  • Limited support for reading YAML files indented with tabs.
  • Added a new "representation hints" system for attaching arbitrary metadata to nodes.
  • Added support for "implicit initialization" in TypeSerializers. This will, for collection types, resolve null node values as empty collections. Implicit initialization is enabled by default.
Breaking changes
  • Moved from ninja.leaping to org.spongepowered package.
  • Moved type serializers from objectmapping.serialize to serialize package.
  • Made node implementation classes package-private, and moved the attributed and commented node subtypes out of their own packages.
  • Dropped the get and set prefixes from method names across the API.
  • No longer depends on the Guava library. This has resulted in a lot of code that formerly used the Guava TypeToken moving to use either java.lang.reflect.Type or the GeAnTyRef TypeToken.
  • Renamed configurate-json implementation to configurate-jackson.
  • Renamed configurate-ext-kotlin to configurate-extra-kotlin.
  • Moved Guice support out of core into configurate-extra-guice.
  • When loading a configuration file, empty lists and maps are represented as such in nodes in all loaders. In the past, some loaders have provided null values instead.
  • YamlConfigurationLoader now returns CommentedConfigurationNode instances, in preparation for full comment support coming in a future release.
  • In the YAML and HOCON loaders, the underlying libraries used are now to be treated as an implementation detail. All API that directly referenced them has been replaced with equivalents that use Configurate types.
  • The default ConfigurationOptions values for shouldCopyDefaults has been set to true.
  • The deprecated node walker has been removed.
Object Mapper

The object mapper has changed quite a bit, so most users will need to change their use in some way.

  • Refactored TypeSerializerCollection to be immutable. A new child collection must be created to add custom type serializers.
  • Redesigned the object mapper to be more extensible. Rather than subclassing the object mapper as some people did before, there are now defined extension points where additional annotations and behaviours can be registered. See the methods in ObjectMapper.Factory.Builder for a more thorough overview.
  • Added support for Java 14+ records and, in combination with the configurate-extra-kotlin module, Kotlin data classes.
    The @Setting annotation is now optional. By default, all non-transient fields will be included in objects, and names will be converted to the kebab-case naming scheme. Both of these can be customized with a custom ObjectMapper.Factory
  • The shouldCopyDefaults option is now respected for mapped object fields.
  • The ObjectMapperFactory field has been removed from ConfigurationOptions. Instead, the object mapper can be registered like any other type serializer, using the TypeSerializerCollection.Builder#registerAnnotatedObjects method.
Bugs fixed
  • Create the parent directory of files being written, to remove a common 'gotcha'.
  • Try to group together events in the watch service listener, to reduce duplicate reloads.
  • Fix merging values into a virtual node not correctly attaching the node (#​181)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@R00tB33rMan
Copy link

🔕

@R00tB33rMan R00tB33rMan deleted the renovate/major-configurate3 branch June 28, 2024 03:56
Copy link
Author

renovate bot commented Jun 28, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 4.x releases. But if you manually upgrade to 4.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant