santacrab2 / PKHeX-Plugins

Plugins for PKHeX
MIT License
53 stars 17 forks source link

fix: add support for Blazor WebAssembly #28

Closed arleypadua closed 2 months ago

arleypadua commented 2 months ago

Context

I'm currently working on a CLI and a webassembly version of PKHeX based on PKHeX.Core, and I'm now adding support to auto-legality mode (proof-of-concept here), but unfortunately Blazor WebAssembly does not play good with calling .Result on tasks because it does not really support thread blocking calls

Furthermore it also has no concept of ProcessPath, throwing an exception whenever I access any static member of TrainerSettings

This MR is mostly refactoring a few things (functionality does not change) so that it works in any runtime/environment.

santacrab2 commented 2 months ago

When built with the commit of pkhex prior to the latest breaking one, this PR causes living dex generations to fail in the Windows GUI version. Once pkhex is functional again. I will try to figure out what is going on with it.

Once that is resolved then with no outstanding issues we can merge the PR to add support for *Blazor-WASM

*already works in other multi-platform frameworks e.g. MAUI.

arleypadua commented 2 months ago

When built with the commit of pkhex prior to the latest breaking one, this PR causes living dex generations to fail in the Windows GUI version. Once pkhex is functional again. I will try to figure out what is going on with it.

Once that is resolved then with no outstanding issues we can merge the PR to add support for *Blazor-WASM

*already works in other multi-platform frameworks e.g. MAUI.

Thanks for the heads up, will try to find some time and debug it with PKHeX 👍🏽