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

A way for the file to automatically require types it doesn't have access to #5

Open
lenscas opened this issue Oct 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@lenscas
Copy link
Owner

lenscas commented Oct 17, 2020

You should be able to pass the TypeWalker a HashMap<Type,RequirePath> so the file is able to reference types it doesn't have access to normally.
A RequirePath contains a string representing what should be placed inside the require ("types/SomeType") and a path to get to the type from the loaded module (TypeMod_1.SomeInnerType.OtherInnerType)

Type could be a string or Cow<'static str> or something else. It just needs to be something the needed type can be compared to.

If a type can not be found while generating the file it should by default stop and return an error. However, a second method should exist that continues, makes a list of types that can't be found and return both.

@lenscas lenscas added the enhancement New feature or request label Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant