Remove In-tree C# Bindings (#1302)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1302

These C# bindings were contributed as part of ff8f17ac99. They have occasionally been refreshed, but has never really had validation it built continuously, or dedicated maintenance.

There has been a surge of work with https://github.com/facebook/yoga/pull/1207 to try to modernize the build for these, but checking with jkoritzinsky I'm not sure either of us have the time to commit to supporting these at the same level as other bindings.

Some well-known projects like Unity had already abandoned this set of bindings for their own. 016297e35c (diff-c85198aaac9095a5446ed00b0fba8025072d235b2b69dea8aad85abc64a83e1e)

So, as part of the work for an official OSS release, and really trying to define what is deprecated, and what we will try to support, I am removing the in-tree C# bindings from Yoga.

In the past, gaps in Yoga bindings we haven't supported have led to new bindings with dedicated maintainers e.g. [FlexLayout](https://github.com/layoutBox/FlexLayout), [yoga-rs](https://github.com/bschwind/yoga-rs), [yoga-wasm-web](https://github.com/shuding/yoga-wasm-web). My hope is that by removing the C# bindings that we are not supporting, we free up the opportunity for a new version to become the defacto.

Reviewed By: javache

Differential Revision: D46425886

fbshipit-source-id: df964c4d55adf93c4d1e82c104e74ca5ad181612
This commit is contained in:
Nick Gerleman
2023-06-05 10:48:10 -07:00
committed by Facebook GitHub Bot
parent 1ab0c7b493
commit 5e74e20a4d
194 changed files with 2 additions and 30985 deletions

View File

@@ -222,22 +222,6 @@ for name, values in sorted(ENUMS.items()):
f.write(" }\n")
f.write("}\n")
# write out csharp files
for name, values in sorted(ENUMS.items()):
with open(root + "/csharp/Facebook.Yoga/Yoga%s.cs" % name, "w") as f:
f.write(get_license("cs"))
f.write("namespace Facebook.Yoga\n{\n")
if isinstance(next(iter(values or []), None), tuple):
f.write(" [System.Flags]\n")
f.write(" public enum Yoga%s\n {\n" % name)
for value in values:
if isinstance(value, tuple):
f.write(" %s = %d,\n" % (value[0], value[1]))
else:
f.write(" %s,\n" % value)
f.write(" }\n")
f.write("}\n")
# write out TypeScript file
with open(root + "/javascript/src/generated/YGEnums.ts", "w") as f:
f.write(get_license("js"))