-
Notifications
You must be signed in to change notification settings - Fork 54
Symbol file import export #468
Symbol file import export #468
Conversation
|
@dcharkes @mahesh-hegde Just a small POC as of now, checkout - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Some high level questions. (Maybe better discussed on https://github.com/dart-lang/ffigen/issues/22 rather than the PR.)
|
@dcharkes I've added a summary in the top comment (#468 (comment)). Let me know when you think this is feature ready, so I can add tests, update readme, etc. |
Thanks! That's a very good write up 👍 |
… with ignore filter)
6db63f0 to
e06ecd1
Compare
dcharkes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with comments (and api discussion in issue)
|
@dcharkes And 3 weeks later, this is finally ready 😝 . I've added tests, updated the readme, and bumped the version. |
|
@dcharkes it seems like macros can have a different USR after all. Not sure why this is the case, but the windows test are failing due to this. For now I've simply removed macros from example/shared_bindings to prevent tests from failing on windows. |
No problemo! Thanks for all your contributions to this open source project!! 🚀
Should we refuse to emit macros in the symbols file then? And emit an error? (And a test that checks that an error is emitted.) |
Yeah, I guess we can.
Do you mean we raise an error and exit without generating the symbol file? Or is it a just warning(or maybe just an info log) which mentions that macros have been removed since they cannot be cross-referenced reliably? I think we're probably seeing this since C allows the redefinition of macros, (albeit with a warning from the compiler). /headers/a.h:17:9: warning: 'BASE_MACRO_1' macro redefined [Lexical or Preprocessor Issue] |
Maybe that is good enough. Let's go for that, and then when we start using this feature more, we can see how that works out in practise. |
dcharkes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet stuff!
Closes dart-lang/native#539
Summary -
A library can now export the symbols by specifying
Exported
symbol.yamlfile looks likeTo import symbols,-
Doing so will