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

Fix: #194 Align scala-native-bindgen with Scala Native 0.4.x API #195

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

ekrich
Copy link
Member

@ekrich ekrich commented Sep 4, 2020

No description provided.

@ekrich
Copy link
Member Author

ekrich commented Sep 23, 2020

@kornilova203 or @jonas - if either of you have time to look at this and give me some pointers it would be great. Everything compiles and runs but the generation doesn't match quite - there are some weird things that don't seem consistent like a struct inside a struct has different assignment/lookup which means you would need to have that context.

@kornilova203
Copy link
Member

Hello @ekrich,
Thank you for the PR and sorry for not responding
I'll take a look in couple days :)

@ekrich
Copy link
Member Author

ekrich commented Sep 24, 2020

@kornilova203 Hope you are doing well. The Scala Center is working on a few things before the 0.4.0 release so we should have a bit of time. I finally realized that without a bunch of study I wasn't going to make it to the finish line.

I got the new Nat / Digit generation - pretty happy with that as it was C++.

The strange thing to me is the differences in pointer dereference in Scala that is different for primitives, structs, and arrays. You have methods for these so I tried to do the right thing for generation. The test errors when running the tests that compare the generation are a bit hard to understand because then you have to find where in the code that in generated.

I have most of normal tests passing.

The StructSpec has a few failing but it seems that a Struct inside a Struct is different now. There could be a problem in Scala Native too so it would be great if figured out that one before the release in case there is a bug.

The second test failing is the FunctionSpec with varadic args as Scala Native only supports va_list, See scala-native/scala-native#1426 This needs to be figured out still. See the CVarArgList in https://github.com/scala-native/scala-native/blob/master/clib/src/main/scala/scala/scalanative/libc/stdio.scala

@kornilova203
Copy link
Member

@ekrich,
I spent couple of hours trying to understand what should be done and realized that I don't have enough energy and motivation to complete the task, sorry.

@ekrich
Copy link
Member Author

ekrich commented Oct 1, 2020

@kornilova203 I totally understand. I was hoping you could look and give me some pointers but the interopt changed quite a bit so it is not obvious so it would take a commitment. I think I can get some help from the people working on Scala Native now.

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

Successfully merging this pull request may close these issues.

2 participants