Releases: sting-ioc/sting
Releases · sting-ioc/sting
Release list
v0.10
Changes in this release:
- Generate an error if an
@Injectorannotated type encloses a type that is not annotated with either@Injectableor@Fragment. - Eliminate a crash when a primitive type dependency was missing and the processor attempted to auto-discover the type.
- Generate an error if an auto-included type is explicitly included in the includes of an
@Injector. This means that any@Injectableor@Fragmentdirectly enclosed within an injector type will generate an error. - Generate an error if an
includesparameter of either the@Injectorannotation or the@Fragmentannotation contains duplicate values. - Generate an error if a
@Fragmentannotated type encloses any types. - Rename the field that contains the dependency kind from "type" to "kind" in the json output.
v0.09
The release includes 2 non breaking API changes.
Changes in this release:
- Upgrade the
org.realityforge.protonartifacts to version0.44. - Add some basic documentation on the following topics:
- Getting Started
- Fragments
- Kinds of Dependencies
- Cleanup the organization of the documentation by introducing the "Essential" and "Advanced" sections.
- Significantly improve the language and grammar in existing documentation.
- Add some additional debug logging in the annotation processor to make debugging the processor in downstream applications easier.
- Generate an error if a dependency of a component is attempts to recompile fails without causing the consumer component to recompile and the injector attempts to build a component graph using the component. Prior to this fix, Sting would generate a null pointer exception. After this fix, Sting produces a more reasonable error message.
- Fix a bug where
@Eagerannotated components that included in an injector transitively via@Fragmentannotated types. - Add initial implementation of
@AutoFragmentannotated types to simplify generation of fragments by gathering candidate components from the classpath. This is considered, an advanced, experimental feature that may change in the future. Look at the documentation for further details.
v0.08
Changes in this release:
- Add some basic documentation on the following topics:
- Accessing services managed by the injector
- Enhance the error message on unresolved injectors to suggest using the
sting.debugannotation processor option. - Add significantly more debug logging to the annotation processor to simplify tracking down unresolved injector errors.
- Ensure that the processor will correct defer an injector to a later round if a transitive include of an
@Injectabletype has not been generated yet but is expected to be generated by another annotation processor.
v0.07
Changes in this release:
- Generate an error if a type annotated with
@Injectableor a method in a@Fragmentannotated type is annotated with@Namedand specifies zero types with a@Typedannotation. There is no reason to specify a qualifier if the binding has no published types. - Move all of the TODOs out of the project and into the Github issue tracker. Setup some milestones so the issues can be categorized according to expected releases.
- Dramatically improve the usability of the documentation infrastructure to make writing documentation easier. This involved using java-style api links, making api docs available when running docusaurus locally, removing historical cruft from earlier projects that used the current docusaurus infrastructure.
- Start to add some basic documentation on the following topics:
- Typing of published services
- Qualifying of consumed and published services
- Passing services into the injector
- Including one injector in another injector
- Annotation processor options
- Fix a bug in the annotation processor which would stop Sting loading descriptor data from the platform or boot classpath. In an ideal world, there should be no sting annotated classes loaded from the platform classpath but some tools (i.e. the IDEA javac process invoked to compile test dependencies) will add dependencies to the platform classpath. As a result Sting has been updated to support this usecase.
- Improve the grammar of the error messages when the Sting annotation processor can find a .class file but can not find the expected descriptor file.
- Add additional debug messages to the Sting annotation processor that describe why a type is not yet resolved. This can help track down errors relating to unresolved injectors.
- Add some additional nullability annotations in the generated fragment that supports injecting injectors in other injectors.
v0.06
Changes in this release:
- If an output method on a
@Injectorannotated type returns a collection then it will now return the same collection if invoked multiple times. - Improve the overview documentation.
- Add some basic documentation comparing the features of Sting relative to Dagger.
- Cache whether a fragment has been resolved across processor rounds. This avoids recalculating the "resolved" state of a fragment when it has already calculated as resolved within the current round or in a prior round.
- Upgrade the
org.realityforge.protonartifacts to version0.41. - Fix a bug where a fragment has not been "resolved" and thus processed before the annotation processor attempts to generate the injector that uses the fragment. This scenario can occur when another annotation processor is responsible for creating the fragment and the other annotation processor creates the fragment in a later round.
- Add the option of generating a .dot report that represents the component graph. The report is generated by the annotation processor when the injector implementation is generated and the annotation parameter
sting.emit_dot_reportsis set totrue. This is typically done by passing the-Asting.emit_dot_reports=trueparameter to the javac compiler. - Fix the ordering of node creation in an injector to ensure dependencies are always created first. Prior to this the ordering was based on maximum depth of the node in any dependency chain which could result in attempts to create nodes with dependencies that had not been created yet.
v0.05
The release includes 3 non breaking API changes.
Changes in this release:
- Add the
@Injector.injectableparameter that that controls whether the annotation processor will generate a provider so that the injector can be included in other injectors. - Add some nullability annotations to the parameters of annotations in the
corepackage. - Add the
@Injector.gwtparameter that that controls whether the annotation processor will customize injector implementation to work within the context of GWT. This primarily involves the addition of the@DoNotInlineannotation to lazy component accessors within the injector implementation. This avoids the scenario where the GWT compiler could inline a component accessor and all transitive lazy component accessors, significantly increasing code-size, compilation time and run time. - Add
synchronizedkeyword to node accessors in the generated injector to avoid problems resulting arising from concurrent attempts to access nodes in a jre context. When transpiled to javascript, concurrent access is impossible and synchronized keyword is ignored. In a JRE context, this serializes node construction but this is not problematic for the current set of supported usecases. - Add a
performance-testsmodule to track performance of Sting over time. The tests will initially measure build times and code when compiled to javascript. The results of the performance testing is written up inperformance.mddocument to make it easily consumable by other parties. It is expected that over time that these performance tests will expand but they currently focus on the primary performance goals of Sting.
v0.04
Changes in this release:
- Improve the javadocs organization.
- Build and measure code size of downstream sample projects to help identify track code size changes as the library evolves.
- Generate a suppressable warning when an
@Injectableannotated type is also annotated with an annotation that is annotated by@javax.inject.Scopethat is used in other injection frameworks like CDI, Dagger, Guice, GIN etc. This generates a warning as it is unusual that an application uses multiple injection frameworks and the presence of a scoped annotation is more likely the result of a misunderstanding or incomplete conversion from a prior injection framework. - Generate an error if a
@Fragmentannotated type or a provider method enclosed by the fragment has a jsr330@javax.inject.Scopeannotated annotation present. - Generate an error if an
@Injectorannotated type or an output method enclosed by the injector has a jsr330@javax.inject.Scopeannotated annotation present.
v0.03
Changes in this release:
- Improve the POM generated for both the
sting-coreandsting-processormodules.
v0.02
Changes in this release:
- Upgrade the
org.realityforge.protonartifacts to version0.40. - Stop generating errors if types are annotated with
@Named,@Typedor@Eagerand they have a provider annotation. - Correct bug where a sting provider annotated type was constructing the classname of the target provider relative to the package of the injector rather the package of the declaring type.
- Change the return type of the factory method used to provide
@Injectablevalues to return ajava.lang.Objectrather than a package-access type. This is to simplify integration with some downstream tools that assume public methods work with public types and to align with the pattern used for passing package-access dependencies into the factory method. - Fix broken code that was generated when a binding is not public but the services it provides are public. The code was previously omitting some required casts.
v0.01
Changes in this release:
🎉 Initial super-alpha release 🎉.