Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated mirrors package with generated code #22

Open
BenVercammen opened this issue Apr 5, 2022 · 2 comments
Open

Replace deprecated mirrors package with generated code #22

BenVercammen opened this issue Apr 5, 2022 · 2 comments

Comments

@BenVercammen
Copy link
Contributor

As noted in the ```README`` file:

The Dart Authors have indicated that Dart::Mirrors is obsolete and will be removed. This is causing grief for many
projects and will cause grief for this project as well as it used runtime checking to find your methods. We will
be moving to a 5.x version which will require code generation to resolve the issue as we use Ogurets heavily in
our testing at FeatureHub.IO (https://featurehub.io)

@BenVercammen
Copy link
Contributor Author

So what would be the plan?

  • Before a test run, the "ogurets code generator" should create a file that collects:
    • step definition locations (_determineStepDefs())
    • step definitions executables (_findMethodStyleStepRunners())
    • ... ?
  • The code generator can/will be triggered by the IntelliJ plugin, much like how ogurets_run.dart is generated
    • this would require work in https://github.com/dart-ogurets/OguretsIntelliJ ?
    • looking into the OguretsIntelliJ project, it seems the ogurets_run.dart file is generated using Java code?
      • maybe it's also a good idea to provide a dart way to generate this file as well?
      • of course, that would mean we'll have to duplicate the generation code, unless we would be able to run the dart generator from the Java code?

@rvowles If you need any help on this, I might be able to look into the code generator part, as I've already got some experience working with analyzer, build, code_builder packages. I'm also fluent in Java, but don't have any experience with IntelliJ plugins yet...

@rvowles
Copy link
Member

rvowles commented Apr 5, 2022

I haven't really thought about it to be honest. I don't think there is any problem running the dart generator from the IDEA plugin, it would seem a better choice to be consistent and have all the code in one place. I'm totally open to any suggestions or PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants