Open menturion opened 2 years ago
thank you; it's a NotImplementedException
which should be properly handled with a proper error message.
The root cause is that the class "App.Shell.AppShell" can't be probably resolved.
It would be helpful if the location where the class is referenced was specified in the error message.
This kind of error (i.e. classes that cannot be resolved) solely/often occurs in vendor libs that are referencing/extending optional ("require-dev") dependencies. Fixing these issues for vendor libs by excluding parts of affected libs is hard if not impossible w/o editing the affected code itself. However, editing vendor libs is a never ending task.
Would it be a feasible way to overcome the absence of a class definition if PeachPie would create an empty dummy class in case it detects the absence of this class (of an optional dependency)? This feature could be enabled for vendor libs by introducing a new compile option.
That's correct, it may create a dummy class that throws in runtime. Or it can postpone the super-class declaration into the runtime.
Also, some composer packages get replaced by other packages in runtime using composer autoload, so ... compiler cannot know and the whole program should be rather jitted. Basically, we expected the use case where the developer prepares the PHP project in a similar way as other compiled languages (like C#) are.
Basically, we expected the use case where the developer prepares the PHP project in a similar way as other compiled languages (like C#) are.
... with the difference that the C# developer was aware of the fact at the time he started the project that he has to provide all the code :)
Could PeachPie easily dummy'fy (i.e. exclude) the classes and their non-existing methods if the developer would be able to tell PeachPie the (non-existing) classes that need to be excluded (e.g. like <Compile ExcludeClass="..." />
)?
The following error is thrown (w/o a reference to the app's source code):