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

Support use of reflectable in packages. #9

Closed
sigurdm opened this issue Jun 17, 2015 · 3 comments
Closed

Support use of reflectable in packages. #9

sigurdm opened this issue Jun 17, 2015 · 3 comments

Comments

@sigurdm
Copy link
Collaborator

sigurdm commented Jun 17, 2015

If we have a package e.g. serialize defining class Serializable extends Reflectable
And another package imports this package and annotating its own classes @Serializable() class A {}. The transformer needs to know about class A when it transforms serializable.
This is currently very hard given the way transformers work.

@sigurdm
Copy link
Collaborator Author

sigurdm commented Jun 18, 2015

After discussing with Floitsch and eernst it seems we are going to generate all the data into the entry-point package.

@jodinathan
Copy link

Hi,

Could this problem be related to this SO question?

http://stackoverflow.com/questions/40453569/use-dart-reflectable-on-external-lib

I am having trouble with this right now :(

@eernstg
Copy link
Collaborator

eernstg commented Nov 7, 2016

I believe this issue is simply obsolete.

We used to put the generated code in the same library as the target code (so if class C was in library c.dart then the corresponding class mirror class etc. would also be in c.dart). This makes it possible to support private features, but it prevents generation of mirrors for declarations in other packages (because a transformer can't edit files in other packages).

But this is long ago, today we generate one file and that file is capable of supplying mirrors for declarations in arbitrary files, or even built-in declarations like int and dynamic (but in return we cannot access private features).

Closing this issue as obsolete now. Please create a new one if there is an interpretation of this issue which is still relevant.

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

No branches or pull requests

3 participants