-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
juliac: log entrypoints and nonstandard typedefs #59108
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
base: master
Are you sure you want to change the base?
Conversation
To facilitate creating bindings for other programming languages, this adds logging to the `juliac` buildscript, optionally outputting a logfile that describes the entrypoints (signatures and return types) and nonstandard typedefs that appear in the entrypoint specifications.
- remove mangling in favor of native Julia printing - include argnames in methods - support and test name argument to ccallable
b983bef
to
334f613
Compare
OK, this is getting more ambitious but running into issues. I'm now trying to actually use the library and not seeing the names I need:
|
Try |
Thanks. I think this may be ready. One caveat is that I haven't finished the package that parses the logfile to generate the |
I can now verify that it works nicely. https://github.com/JuliaInterop/JuliaLibWrapping.jl |
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.
Thanks for taking the initiative on this, this is lovely!
Some thoughts on the implementation, but I am definitely in favor of the feature 👍
Co-authored-by: Cody Tapscott <[email protected]>
With luck, this makes this information easier to consume downstream (and to expand on in the future). Also fixes a couple of obscure bugs that would cause mis-behavior in the presence of recursive types, or which could unintentionally mangle types in the event of sub-string collisions.
3dad123
to
4993dea
Compare
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.
This looks great, many thanks!
7624f80
to
d51511a
Compare
375c436
to
42c8031
Compare
42c8031
to
77b1916
Compare
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.
This looks very good. Only small quibbles, then I think this is ready to merge.
type_ids::IdDict{Any,Int} | ||
end | ||
|
||
function escape_string_json(s::AbstractString) |
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.
IIUC there isn't a "meaningful" test of this escaping.
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.
It looks like we have a number of copies of this now running around (test_print_str_escape_json, json_repr). Can we potentially combine them, or at least put them all in a single file to include as needed, so that we can make sure they all use the same logic?
Oh, and if we don't want the support for recursive types to regress, we should add a test for that too. |
322a9ef
to
6161dab
Compare
Co-authored-by: Jameson Nash <[email protected]>
91be2f9
to
d9ea0eb
Compare
ec234aa
to
7adc37b
Compare
Not quite sure how to fix the test failure here...I can't even seem to run these tests locally anymore. |
To facilitate creating bindings for other programming languages, this adds logging to the
juliac
buildscript, optionally outputting a logfile that describes the entrypoints (signatures and return types) and nonstandard typedefs that appear in the entrypoint specifications.My Makefile skills are rudimentary at best, so please do check that aspect with particular care.