wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

c#: Items named `Encoding` clashing with `System.Text.Encoding`

Open MendyBerger opened this issue 9 months ago • 3 comments

Wit items named "Encoding" clash with System.Text.Encoding used in the binding code.

E.g.

resource foo {
  encoding: func();
}

Can the binding code refer to Encoding with the full path System.Text.Encoding?

MendyBerger avatar Mar 17 '25 03:03 MendyBerger

That sounds reasonable to me. Since the binding generation tool is wit-bindgen. I am going to transfer this issue there

jsturtevant avatar Mar 19 '25 22:03 jsturtevant

We could probably use the fully qualified name for all system library calls to avoid this issue for other types of functions

jsturtevant avatar Mar 19 '25 22:03 jsturtevant

Also use on the class or methods

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("wit-bindgen", "0.41.0")]

pavelsavara avatar Mar 20 '25 07:03 pavelsavara

This was fixed by #1275.

just-ero avatar Jul 07 '25 12:07 just-ero