Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
ERRAI-1075: Integration tests using APT generators (#316)

* Allow multiple @ErraiApps in same jar

* Generating code for multiple @ErraiApp annotations. With problems.

* Fixed many errors in errai-ui tests APT codegen

* Partially fix errai-bus tests code generation

* Fix ErraiAptExportedTypes tests

* Fix multidimensional arrays marshaller factory generation

* Configured APT generators for errai-ioc. There are error still.

* Configure APT generators for errai-ioc-bus-support. There are still errors.

* Configure APT generators for errai-cdi-server. Fix export file exported public types

* Fix exporting only public elements in Export Files for good

* Fix exporting parameters of methods/constructors annotated with @Inject

* Fix exporting primitive values

* Configure APT generators for errai-data-binding.

* Configure APT generators for errai-jaxrs-client

* Configure APT generators for errai-navigation and errai-validation. Still broken.

* Fix random error caused by local exportable types not being erased

* Make generators be exported as part of their ErraiModule

* Remove test

* Removed unused parameter

* Reorganize tests in errai-security and configure APT generators

* Fix stylesheet files discovery

* Fix stylesheet load for reals

* Fix class name of generated files for local @ErraiApps

* Revert some undesired changes

* Prepared for running tests with apt-generated code

* Create GWT Module file generator to override rebinding rules for APT-generated code

* GWT modules being adapted to apt-generated classes in demos as well

* Place gwtModuleName in @ErraiApp

* Moved GWT module generation to ErraiAppAptGenerator

* Added additionalClassElement configuration to errai-ui

* Improve switch between generating code using APT or GWT generators

* General improvements

* Add testResources configuration to errai-ui

* Configure remaining test @ErraiApps in errai-cdi-server

* More tests configuration

* Remove comments on ErraiGenerators

* Fix errai-security-client IT tests code generation error

* General fixes

* Fixed some tests and add MetaMethodTest for all MetaMethod impls

* Add asyncBeanManager property to async tests @ErraiApp

* Add scope to un-annotated implementations of interface

* Make APTClass be the first option in MetaClassFactory

* Fix error in MetaClassFactory.get

* Resolved primitive issues in MetaClassFactory.loadClass

* Resolved primitive issues in MetaClassFactory.loadClass

* Make sure APTClassUtil is not initialized before codegen tests

* Fix broken test

* Make errai-codegen tests use APTClass before using JavaReflectionClass

* PR general pass

* Rollbcak unneeded change

* Create errai-ioc-extension-tests

* Add log4j.properties to errai-navigation tests

* CDI IOCExtensions now stay in another module and are pre-compiled

* Created mechanism to define exporting strategies depending on the annotation

* Replaced ExportedAnnotations for ExportingStrategies configuration class

* Fixed tests

* Small refactors

* Minor fixes/refactorings

* Fixed errai-navigation tests. Attemp to fix errai-validation but not complete yet

* Fix errai-jaxrs-client tests by configuring mappingAliases correctly

* Fixed one of the broken tests in errai-ioc

* Fix errai-ioc test by configuring @ErraiModule properly

* Improved exporting strategies for errai-ioc and errai-jaxrs-client

* Created jsInteropSupportEnabled configuration property

* Create dynamic validation property in @ErraiApp

* Fix almost every test in errai-data-binding

* Fix StyleBindingDecorator

* Fix errai-ioc test by dealing correctly with generic arrays as parameters in constructors/methods

* Fixed some of the server/client code generation problems

* Server code generation and CDI test fixes

* Moved Funject out of errai-cdi-server, so that it is pre-compiled

* Fix RpcIntegrationTest

* Fix SpecializationIntegrationTest

* Attempt to fix Stereotypes test

* Reset definitions factory before generating code for an @ErraiApp

* Fix JsTypeInjectionTest by changing from List to Set in WindowInjectionContextImpl providers

* General refactorings

* Fix DisconnectedEventIntegrationTest

* Fix BeanManagerIntegrationTest.testNormalScopeOverridesDependent

* Fix BeanManagerIntegrationTest.testBeanManagerLookupInheritedScopeBean by returning inherited annotations on APTClass as well

* Created tests for inherited annotations in APTClass

* Ignore tests of unsupported features in APT environment

* Fix MetaClassFinder extending/restriction methods

* Make ValidatorFactoryGenerator async and ignore dynamic validation tests for now.

* Fix configuration to ignore tests of unsupported features in APT environment

* Remove local flag from '@ErraiApp'. An app is local when the modules property is not empty

* PR final pass

* PR fixes

    • -28
    • +0
    ./decorator/DecoratorAPITests.gwt.xml
    • -71
    • +0
    ./decorator/client/DecoratorAPITests.java
    • -49
    • +0
    ./decorator/client/res/MyDecoratedBean.java
    • -28
    • +0
    ./extensions/IOCExtensionTests.gwt.xml
    • -40
    • +0
    ./extensions/client/ExtensionProviderTest.java
    • -45
    • +0
    ./extensions/client/IOCLoggingInjectorTest.java
    • -126
    • +0
    ./extensions/client/UncaughtExceptionHandlingIntegrationTest.java
    • -44
    • +0
    ./extensions/client/WidgetIOCExtensionTest.java
    • -39
    • +0
    ./extensions/client/res/AppScopedUncaughtExceptionHandler.java
    • -36
    • +0
    ./extensions/client/res/ClassWithNonBindingQualifiedFields.java
    • -39
    • +0
    ./extensions/client/res/DependentUncaughtExceptionHandler.java
    • -27
    • +0
    ./extensions/client/res/ExceptionForAppScopedHandler.java
  1. … 666 more files in changeset.
ERRAI-1075: Create APT generator for errai-marshalling (#296)

* Create APT generator for NavigationGraphGenerator

* Start to move errai-marshalling configuration out of EnvUtil clas

* Fixed exposed and nonExposed portable types

* Inline methods and add comment

* Fix NullPointerException

* Move Marshalling configuration out of EnvUtil

* Create MarshallersAptGenerator (not working)

* Prepare MarshallersGenerator to run in APT environment too

* Make errai-marshalling use completely interchangeable ErraiConfiguration implementations

* Fix ClassScanner parameters to use reflections while searching @Portable types

* Make MetaClassFinder available for DefinitionsFactoryImpl

* Add @MappingAlias annotation to ErraiConfiguration

* Make MarshallerAptGenerator work, but with errors

* Scan @ServerMarshallers with MetaClassFinder

* Fix tests and improve GWT environment MetaClassFinder

* Improve MarshallerAptGenerator. References not yet resolved in MarshallerFactoryImpl

* Make ErraiMarshalling.gwt.xml use APT generators and skip creation of abstract classes in generated marshallers

* MarshallerAptGenerator working with both GWT and APT generators

* MarshallerAptGenerator working and generating every Marshaller

* Fix logging in errai-demos

* Fix X marshaller not found (generics)

* Little refactors

* Remove static initialization of ErraiAppPropertiesConfiguration in MarshallingConfiguration

* Remove QualifyingMetaDataFactory property

* Remove unsafe call from errai-ioc decorators logic

* Add PageRequest in ErraiMarshallingModule's configuration

* Rollback parameter type to erased

* Revert "Remove unsafe call from errai-ioc decorators logic"

This reverts commit b496229be2f7ecaa50e9ea4c5951035772d10487.

* Fix issue with generic field/parameters. Add time logs to files generation in APT environment.

* Remove @Portable annotation added by mistake

* Remove unsafeIsAnnotationPresent from HasAnnotations

* Remove unsafe methods from HasAnnotations

* Remove AbstractHasAnnotations class

* Refactor configuration files

* Add tests to new properties in @ErraiApp

* Update comments

* PR final pass

* Remove even more unsafe calls from HasAnnotations implementation

* Removed annotation caches and unnecessary methods from subclasses of HasAnnotations

    • -11
    • +14
    ./extensions/rebind/NonBindingAttributeExtensionProvider.java
  1. … 158 more files in changeset.
Create APT generators for errai-ioc module

    • -2
    • +1
    ./extensions/rebind/NonBindingAttributeExtensionProvider.java
  1. … 256 more files in changeset.
Add Errai APT Generators mechanism

    • -1
    • +1
    ./extensions/rebind/NonBindingAttributeExtensionProvider.java
  1. … 271 more files in changeset.
ERRAI-1018: Support for javax.enterprise.inject.Typed

* Rework implementation of injectables matching sites of the exact type.

Now uses a predicate on the path of references used to resolve a dependency

in order to determine if a resolved candidate satisfies an injection site.

* Use path predicate to support @Typed for resolution of dependencies at

compile time.

* When @Typed is present, only use types in @Type for assignable types.

This allows beans to only be looked up dynamically by types in @Typed.

    • -0
    • +192
    ./wiring/client/BasicIOCTest.java
    • -0
    • +39
    ./wiring/client/res/QualForTypedBean.java
    • -0
    • +25
    ./wiring/client/res/TypedBaseType.java
    • -0
    • +58
    ./wiring/client/res/TypedProducer.java
    • -0
    • +25
    ./wiring/client/res/TypedSuperInterface.java
    • -0
    • +25
    ./wiring/client/res/TypedTargetInterface.java
  1. … 22 more files in changeset.
Temporarily revert ERRAI-1018 commit because of downstream project issues.

This reverts commit a35e7f90a7d23ce5595da188f55d1c954c14c8c6.

    • -192
    • +0
    ./wiring/client/BasicIOCTest.java
    • -39
    • +0
    ./wiring/client/res/QualForTypedBean.java
    • -25
    • +0
    ./wiring/client/res/TypedBaseType.java
    • -58
    • +0
    ./wiring/client/res/TypedProducer.java
    • -25
    • +0
    ./wiring/client/res/TypedSuperInterface.java
    • -25
    • +0
    ./wiring/client/res/TypedTargetInterface.java
  1. … 17 more files in changeset.
ERRAI-1018: Support for javax.enterprise.inject.Typed

* Rework the mechanism for having injectables satisfy only injection

sites. Now each injectable supplies a predicate that evaluates the

path used to resolve itself for a given site. The predicate can veto

a path so that the injectable is not resolved for that site.

* Use new path predicate mechanism to support @Typed. Beans with

@Typed have a predicate that only returns true if the injection

site is one of the types declared in the @Typed annotation.

    • -0
    • +192
    ./wiring/client/BasicIOCTest.java
    • -0
    • +42
    ./wiring/client/res/QualForProducedTypeBean.java
    • -0
    • +39
    ./wiring/client/res/QualForTypedBean.java
    • -0
    • +25
    ./wiring/client/res/TypedBaseType.java
    • -0
    • +58
    ./wiring/client/res/TypedProducer.java
    • -0
    • +25
    ./wiring/client/res/TypedSuperInterface.java
    • -0
    • +25
    ./wiring/client/res/TypedTargetInterface.java
    • -0
    • +31
    ./wiring/client/res/TypedType.java
  1. … 17 more files in changeset.
Support destruction of @ApplicationScoped beans.

Previously a @PreDestroy would be called but

@ApplicationScoped instance would remain in service.

    • -2
    • +5
    ./decorator/client/DecoratorAPITests.java
    • -0
    • +46
    ./wiring/client/res/AppScopedWithPreDestroy.java
  1. … 9 more files in changeset.
Fix bugs related to producer methods and fields (details below).

The issues that were fixed:

* Static producers weren't found in types with no other annotations

* Non-static field producers weren't found in types with no other annotations

* A type containing a static producer of itself would be ambiguous

if it had a public, no-arg constructor

    • -0
    • +33
    ./wiring/client/res/FieldProducedSelf.java
    • -0
    • +30
    ./wiring/client/res/FieldProducedSimpleton.java
    • -0
    • +39
    ./wiring/client/res/StaticProducerOfSelf.java
    • -0
    • +37
    ./wiring/client/res/StaticProducerOfSelfSimpleton.java
    • -0
    • +35
    ./wiring/client/res/TypeWithJustAFieldProducer.java
  1. … 2 more files in changeset.
ERRAI-1002: Compilation issue with @ApplicationScope

    • -0
    • +38
    ./wiring/client/res/AbstractClassWithPreDestroy.java
    • -0
    • +28
    ./wiring/client/res/ApplicationScopedBeanInheritingPreDestroy.java
  1. … 2 more files in changeset.
Add reproducer for ERRAI-994 and ERRAI-996.

    • -0
    • +34
    ./wiring/client/res/ChildWithSetterOverride.java
    • -0
    • +36
    ./wiring/client/res/ParentWithSetter.java
    • -0
    • +31
    ./wiring/client/res/SetterInjected.java
    • -0
    • +37
    ./wiring/client/res/SetterInjectedProducer.java
ERRAI-981: Convert @UncaughtException to work with all uncaught exceptions (not just those in the client message bus)

    • -0
    • +126
    ./extensions/client/UncaughtExceptionHandlingIntegrationTest.java
    • -0
    • +39
    ./extensions/client/res/AppScopedUncaughtExceptionHandler.java
    • -0
    • +39
    ./extensions/client/res/DependentUncaughtExceptionHandler.java
    • -0
    • +27
    ./extensions/client/res/ExceptionForAppScopedHandler.java
    • -0
    • +27
    ./extensions/client/res/ExceptionForDependentHandler.java
    • -0
    • +27
    ./extensions/client/res/ExceptionForPrivateHandler.java
    • -0
    • +40
    ./extensions/client/res/PrivateUncaughtExceptionHandler.java
    • -0
    • +46
    ./extensions/client/res/UncaughtExceptionTestLogger.java
  1. … 13 more files in changeset.
Get rid of JsTypeInjectionTest suite and run all ioc tests with generatedJsExports and ioc jsinterop support.

    • -26
    • +549
    ./wiring/client/JsTypeInjectionTest.java
    • -574
    • +0
    ./wiring/client/prod/JsTypeInjectionTest.java
  1. … 1 more file in changeset.
Fix test failures caused by prev. commit (see below)

- Make sure jsInterop exports are on for JsTypeInjectionTest

- Fix wrong generated method call on EventListener

    • -1
    • +1
    ./wiring/client/JsTypeInjectionTest.java
  1. … 1 more file in changeset.
Disable WindowInjectionContext by default (add property to enable).

    • -0
    • +3
    ./wiring/client/JsTypeInjectionTest.java
  1. … 4 more files in changeset.
Fix bugs with ManagedInstance in producer methods (description below).

* Destroy dependent scoped parameters of producer methods.

* Fix stack overflow when when destroying managed bean returned by producer method.

    • -0
    • +38
    ./beanmanager/client/ManagedInstanceTest.java
    • -0
    • +36
    ./beanmanager/client/res/AppScopedBProducer.java
    • -0
    • +33
    ./beanmanager/client/res/B.java
    • -0
    • +33
    ./beanmanager/client/res/C.java
    • -0
    • +45
    ./beanmanager/client/res/DepScopedBProducer.java
    • -0
    • +40
    ./beanmanager/client/res/OtherDestructableClass.java
  1. … 2 more files in changeset.
Make native JsType interface for WindowInjectionContext and add logging.

    • -11
    • +12
    ./wiring/client/prod/JsTypeInjectionTest.java
  1. … 7 more files in changeset.
Update GWT to 2.8.0-rc1 (lots of details below).

Most of the items below were fixes for tests (which

are now production compiled by default) and dependency

issues (since gwt-user/gwt-dev now bring in transitive

dependencies instead of bundling them in fat jars).

* Upgrade jetty to version in ip-bom

* Fix errai-bus test issues.

* Remove GuardedBy and Nonnull annotations from errai-bus.

* Fix javadoc bug in errai-bus.

* Fix test failures caused by GWT type oracle behaviour change.

(This commit causes the type oracle to hide non-abstract methods

in interfaces:

https://github.com/gwtproject/gwt/commit/75382f1202bf3eaa399d60ebdba42bd7522da3bb)

* Fix AbstractErraiTest so it is usable in errai-ioc-bus-support production compiled tests.

* Fix data-binding tests (have to manually invoke event listeners because dispatchEvent does not work).

* Fixes for errai-cdi-server tests (description below).

* Upgrade Jetty version

* Add -devMode gwt.arg

* Add missing inherited modules

(This was to try and get the tests to run in prod mode,

but there appears to be a compiler bug that prevents this

-- interned value is used before being referenced)

* Use errai.devel.nocache property in Errai GWT generators.

* Fix jaxrs-client bug with Date params.

* Fix errai-ui tests (notes below).

** Fix event dispatching issue (same problem as with data-binding tests).

** Fix NPE when an empty input element fires a change event while bound

to a primitive property in a model.

* Fix errai-navigation native anchor test (same problem as data-binding tests).

* Fix Errai Security tests.

* Fix errai-jpa-client tests.

* Fix gwt-dev version in demos.

* Manage gson version in errai-bom to version required by gwt-dev.

    • -5
    • +5
    ./wiring/client/res/ProducedJsType.java
  1. … 99 more files in changeset.
Selecting subtype and then destroying all with should only affect the selected ManagedInstance.

    • -1
    • +21
    ./beanmanager/client/ManagedInstanceTest.java
  1. … 1 more file in changeset.
ERRAI-961: Migrate IOCUtil functionality from kie-wb-common into errai-ioc as enhanced version of Instance<T>

Created a ManagedInstance<T> type with an API like Instance<T> except

with different memory management semantics. A ManagedInstance<T> holds

references to all dependent beans it creates and will destroy them

when it itself is destroyed.

This feature required adding capability to for disposing beans

to IOCProviders.

    • -0
    • +31
    ./beanmanager/IOCBeanManagerTests.gwt.xml
    • -0
    • +232
    ./beanmanager/client/ManagedInstanceTest.java
    • -0
    • +33
    ./beanmanager/client/res/A.java
    • -0
    • +39
    ./beanmanager/client/res/AAppScopedBean.java
    • -0
    • +39
    ./beanmanager/client/res/ADependentBean.java
    • -0
    • +60
    ./beanmanager/client/res/BeanWithManagedInstance.java
    • -0
    • +38
    ./beanmanager/client/res/DefaultAppScopedBean.java
    • -0
    • +38
    ./beanmanager/client/res/DefaultDependentBean.java
    • -0
    • +42
    ./beanmanager/client/res/DestructableClass.java
    • -0
    • +35
    ./wiring/client/res/BeanWithProvidedBeansInjected.java
    • -0
    • +43
    ./wiring/client/res/ContextualProviderAndDisposer.java
    • -0
    • +28
    ./wiring/client/res/ContextuallyProvidedDisposableBean.java
    • -0
    • +35
    ./wiring/client/res/DisposableBean.java
    • -0
    • +41
    ./wiring/client/res/ProvidedAndDisposer.java
  1. … 10 more files in changeset.
Remove default method from JsTypeProvider (see below)

GWT is now hiding default methods from generators and

prevents us from generating subtypes of JsTypeProvider

which override getQualifiers:

https://github.com/gwtproject/gwt/commit/75382f1202bf3eaa399d60ebdba42bd7522da3bb

    • -0
    • +35
    ./wiring/client/prod/JsTypeInjectionTest.java
  1. … 1 more file in changeset.
ERRAI-959: Dependent bean in cycle with no default constructor can blow up at runtime.

    • -30
    • +41
    ./wiring/client/BasicIOCTest.java
    • -0
    • +35
    ./wiring/client/res/AppScopedBeanInConstructorCycle.java
    • -0
    • +35
    ./wiring/client/res/DependentBeanWithConstructorCycle.java
  1. … 2 more files in changeset.
Test IOC extension sees correct values of nonbinding qualifier properties.

    • -0
    • +40
    ./extensions/client/ExtensionProviderTest.java
    • -0
    • +37
    ./extensions/client/res/AnnoWithNonBindingAttribute.java
    • -0
    • +36
    ./extensions/client/res/ClassWithNonBindingQualifiedFields.java
    • -0
    • +90
    ./extensions/rebind/NonBindingAttributeExtensionProvider.java
  1. … 3 more files in changeset.
Test that singleton, native JS type beans are not proxied.

    • -3
    • +10
    ./wiring/client/prod/JsTypeInjectionTest.java
    • -0
    • +3
    ./wiring/client/res/NativeTypeTestModule.java
    • -0
    • +30
    ./wiring/client/res/SingletonJsType.java
    • -0
    • +36
    ./wiring/client/res/SingletonJsTypeProducer.java
Fix test for dynamic qualifiers.

    • -5
    • +14
    ./wiring/client/prod/JsTypeInjectionTest.java
  1. … 1 more file in changeset.
Add support for getQualifiers to JsTypeBeanDefs

* Todo: better support for array members.

* Todo: fix test

    • -0
    • +40
    ./wiring/client/prod/JsTypeInjectionTest.java
    • -0
    • +32
    ./wiring/client/res/JsTypeWithQualifiers.java
    • -0
    • +39
    ./wiring/client/res/QualWithMultiMembers.java
  1. … 14 more files in changeset.
Rename External to Shared and WindowScope to SharedSingleton, +javadoc

    • -2
    • +2
    ./wiring/client/res/ExternalJsTypeImpl.java
    • -4
    • +4
    ./wiring/client/res/ExternalTestModule.java
  1. … 8 more files in changeset.
Add test for ApplicationScoped bean injecting self and invoking proxied method in postconstruct.

    • -0
    • +48
    ./wiring/client/res/AppScopedBeanInvokingSelf.java
Support sharing a single instance of a JsType defined in two scripts via new window scope.

    • -0
    • +129
    ./wiring/client/prod/JsTypeInjectionTest.java
    • -0
    • +35
    ./wiring/client/res/ConcreteWindowScopedJsType.java
    • -0
    • +30
    ./wiring/client/res/ExternalJsTypeIface.java
    • -0
    • +36
    ./wiring/client/res/ExternalJsTypeImpl.java
    • -0
    • +55
    ./wiring/client/res/ExternalTestModule.java
    • -0
    • +28
    ./wiring/client/res/InternallySatisfiedImpl.java
    • -0
    • +32
    ./wiring/client/res/InternallySatisfiedJsTypeIface.java
    • -0
    • +32
    ./wiring/client/res/InternallyUnsatisfiedJsTypeIface.java
  1. … 8 more files in changeset.
Fix getAllSuperTypesAndInterfaces bug causing JsType duplicates in WindowInjectionContext.

    • -0
    • +18
    ./wiring/client/prod/JsTypeInjectionTest.java
    • -0
    • +28
    ./wiring/client/res/DuplicateInterface.java
    • -0
    • +28
    ./wiring/client/res/JsSubTypeWithDuplicateInterface.java
    • -0
    • +28
    ./wiring/client/res/JsSuperTypeWithDuplicateInterface.java
  1. … 1 more file in changeset.