Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Make serialization.dart compatible with Dart editor #10

Open
gazialankus opened this issue Jan 4, 2015 · 2 comments
Open

Make serialization.dart compatible with Dart editor #10

gazialankus opened this issue Jan 4, 2015 · 2 comments

Comments

@gazialankus
Copy link
Contributor

I am not a dart expert and I may be wrong, but it seems like the lines such as

import 'package:mypackage/myclass_serialization_rules.dart';

appear as errors in the Dart editor are underlined in red. However, it seems to work fine when ran. These apparent errors are an annoyance for the programmer.

Would there be at least a workaround not to see these errors and have serialization.dart be compatible with the Dart editor?

Alternatively, is there a bug report in Dart editor to make this happen?

Thanks.

@nicolasgarnier
Copy link

I'm taking care of this in #9 :)

The issue is that you need to import a file that has not yet been created. The file gets created at built-time by the transformer though. In my Pull Request I propose to add an import re-writer.

@gazialankus
Copy link
Contributor Author

That's great to hear, thanks for your work!

By the way, do you think it would ever be possible for Dart editor to know about files that will be generated? (maybe actually create these files in a directory that is out of sight?) Does it make sense to tell Dart editor developers anything about this in case some other package wants to use such transformers?

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

No branches or pull requests

2 participants