eddyson-de / tapestry-react

Integration of Apache Tapestry and React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash preparing application config if Symbol is missing

benweidig opened this issue · comments

Hi,

in some scenarios when not all symbols are available the ReactModule might crash trying to contribute the application config.

Symbols:
https://github.com/eddyson-de/tapestry-react/blob/master/src/main/java/de/eddyson/tapestry/react/ReactModule.java#L119-L121

Crashing line:
https://github.com/eddyson-de/tapestry-react/blob/master/src/main/java/de/eddyson/tapestry/react/ReactModule.java#L122

Already working on a pull request.

I'm curious what that scenario might be. Are you running without tapestry-core?

We are running Tests with TynamoTest and Tapestry TestRunner which go around TapestryFilter and the initialization of the EXECUTION_MODE symbol (https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java#L91)

Since the tapestry-react module provides an 'Tapestry-Module-Classes' entry in MANIFEST.MF, the ReactModule is being loaded and the Symbol tapestry.execution-mode can not be resolved.

Thanks for the explanation. I'm not sure where and how this should be fixed. Someone should probably set tapestry.execution-mode to test and I'd say it's up to the test environment setup.

I still think that tapestry.execution-mode should always be set if a Tapestry application is running. If it isn't, the setup is broken and this is not something I want to work around.