Generated mono bindings do not match docs #27

Open
opened 2023-06-07 09:43:35 -07:00 by rggammon · 6 comments
Contributor

I built the c# bindings with .net core 7 on windows, and I am noticing a few differences between the bindings and the samples eg:

A "Csharp" namespace -

Efl.Csharp.Components.Ui instead of Efl.Components.Ui

win.Text instead of win.SetText

win.Text = "Hello, C#!!";

Efl.All.Init(Efl.Csharp.Components.Ui);

Efl.Ui.Win win = new Efl.Ui.Win(null, "Hello C#");
win.Text = "Hello, C#!!";

I am not sure if this is expected, or related to my build environment.

I built the c# bindings with .net core 7 on windows, and I am noticing a few differences between the bindings and the samples eg: A "Csharp" namespace - > Efl.Csharp.Components.Ui instead of Efl.Components.Ui win.Text instead of win.SetText > win.Text = "Hello, C#!!"; Efl.All.Init(Efl.Csharp.Components.Ui); Efl.Ui.Win win = new Efl.Ui.Win(null, "Hello C#"); win.Text = "Hello, C#!!"; I am not sure if this is expected, or related to my build environment.
Owner

i have no answer (yet) but just for me: did you also try to compile with mono ? What is your meson command please ?

i have no answer (yet) but just for me: did you also try to compile with mono ? What is your meson command please ?
Author
Contributor

Re: the Efl.Components.Ui issue, this looks like it was a code change to make it Efl.Csharp.Components.Ui

0860c4f1d7

would updating the docs be ok for this issue (adding the "Csharp" to Efl.Csharp.Components.Ui)? I could also run down what changed for the other things that are not compiling.
https://www.enlightenment.org/develop/tutorials/csharp/hello-world-cs.md

Re: the Efl.Components.Ui issue, this looks like it was a code change to make it Efl.Csharp.Components.Ui https://github.com/Enlightenment/efl/commit/0860c4f1d7a6fa0f6ecae556cf35d33fa7c13a66 would updating the docs be ok for this issue (adding the "Csharp" to Efl.Csharp.Components.Ui)? I could also run down what changed for the other things that are not compiling. https://www.enlightenment.org/develop/tutorials/csharp/hello-world-cs.md
Author
Contributor

meson --libdir=lib --default-library shared -Dsystemd=false -Dpulseaudio=false -Dv4l2=false -Dlibmount=false -Deeze=false -Dx11=false -Dxinput2=false -Devas-loaders-disabler='pdf','ps','rsvg','json' -Dopengl=none -Dpixman=true -Dembedded-lz4=false -Dfribidi=true -Dinput=false -Dbuild-examples=false -Dbuild-tests=false -Dbindings='mono','lua','cxx' -Dlua-interpreter=luajit -Delua=true -Ddotnet=true build

meson --libdir=lib --default-library shared -Dsystemd=false -Dpulseaudio=false -Dv4l2=false -Dlibmount=false -Deeze=false -Dx11=false -Dxinput2=false -Devas-loaders-disabler='pdf','ps','rsvg','json' -Dopengl=none -Dpixman=true -Dembedded-lz4=false -Dfribidi=true -Dinput=false -Dbuild-examples=false -Dbuild-tests=false -Dbindings='mono','lua','cxx' -Dlua-interpreter=luajit -Delua=true -Ddotnet=true build

I confirmed this. I'm the person who asked the MSYS2 project to update EFL to the latest version, and they really updated it. When I was trying to compile the example code, I encountered the very same problem. It seems nothing has changed in the last five months.

https://github.com/msys2/MINGW-packages/issues/19591

I confirmed this. I'm the person who asked the MSYS2 project to update EFL to the latest version, and they really updated it. When I was trying to compile the example code, I encountered the very same problem. It seems nothing has changed in the last five months. https://github.com/msys2/MINGW-packages/issues/19591
Author
Contributor

@vtorri / raster - The way forward here could involve a combination of updating code (eg: code change to drop the Csharp out of "Efl.Csharp.Components.Ui"), updating the docs (eg: code wants "win.Text = " vs documented "win.SetText(..." -- the generated code seems better, docs could change), and perhaps adding hello-world.cs so it compiles as part of the build, eg: as a test.

If all that sounds good, I could send a few PR's :)

  • A PR for Efl.Csharp.Components.Ui -> Efl.Components.Ui
  • A PR? to change the docs to match the setter pattern, win.Set*() -> win.* =
  • A PR to add hello-world.cs so if there is an unexpected api change, it breaks the build.
@vtorri / raster - The way forward here could involve a combination of updating code (eg: code change to drop the Csharp out of "Efl.Csharp.Components.Ui"), updating the docs (eg: code wants "win.Text = " vs documented "win.SetText(..." -- the generated code seems better, docs could change), and perhaps adding hello-world.cs so it compiles as part of the build, eg: as a test. If all that sounds good, I could send a few PR's :) - A PR for Efl.Csharp.Components.Ui -> Efl.Components.Ui - A PR? to change the docs to match the setter pattern, win.Set*() -> win.* = - A PR to add hello-world.cs so if there is an unexpected api change, it breaks the build.
Owner

TBH - I have no real opinions on C#/mono myself - so i'll leave it to people actually trying to use it to decide and come up with a consensus. :)

TBH - I have no real opinions on C#/mono myself - so i'll leave it to people actually trying to use it to decide and come up with a consensus. :)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: enlightenment/efl#27
No description provided.