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

Remove C# and Java targets #11551

Merged
merged 66 commits into from Feb 6, 2024
Merged

Remove C# and Java targets #11551

merged 66 commits into from Feb 6, 2024

Conversation

Simn
Copy link
Member

@Simn Simn commented Feb 5, 2024

Alright, I don't want to make this more dramatic than it needs to be, but I do want to say a few words!

The C# and Java targets have been around since Haxe 2.10, released in July 2012. At the time, Cauê Waneck had managed to create both of these targets at the same time. Due to a certain similarity between them, he was able to share large portions of internal logic in the "gencommon" framework, and then had little more than a syntax printer for each of them.

Over the next several Haxe versions, both targets saw many improvements. One of the most impressive additions were the --java-lib and --net-lib command line arguments, which allowed Haxe users to utilize native C# and Java code in their Haxe programs. After ironing out some kinks, targeting these languages from Haxe became quite enjoyable, and especially the C# target saw some quite interesting use-cases.

However, technology changes, and people move on. As Cauê found other interests, maintenance of the C# and Java target suffered. Several issues kept coming up, and there was little we could do about them because the resources that would have been required to address them properly could not be justified. At some point, it became clear that something needed to change, and we're now at a point where we have to make the call to remove these targets for Haxe 5.

If you've been using the Java target, the good news is that Haxe now has a quite stable JVM target which bypasses the Java source compilation. We encourage everyone to check it out and report any issues!

As for the C# target, there is no direct replacement available at this time. Our hope in this regard is that the Reflaxe community will pick up the task in reflaxe.CSharp. We'll be happy to help making this a reality.

Thank you to everyone involved! I'll keep this PR open until we went through all the issues to list the ones specific to Java and C# in order to add them here.


Closes #11547, closes #11527, closes #10954, closes #10930, closes #10920, closes #10848, closes #10801, closes #10787, closes #10556, closes #10492, closes #10421, closes #10332, closes #10250, closes #10216, closes #10163, closes #10094, closes #9951, closes #9940, closes #9871, closes #9669, closes #9293, closes #9285, closes #8933, closes #8519, closes #8497, closes #8395, closes #8347, closes #8247, closes #7746, closes #6934, closes #6817, closes #6605, closes #6474, closes #6464, closes #6164, closes #6114, closes #6073, closes #5838, closes #5825, closes #5743, closes #5552, closes #5492, closes #5377, closes #5247, closes #5110, closes #4901, closes #4597, closes #4475, closes #4091, closes #3741

Simn and others added 30 commits April 9, 2023 13:46
# Conflicts:
#	.github/workflows/main.yml
#	libs/ilib/dune
#	libs/ilib/peReader.ml
#	libs/javalib/dune
#	src-json/define.json
#	src/codegen/dotnet.ml
#	src/codegen/gencommon/castDetect.ml
#	src/codegen/gencommon/closuresToClass.ml
#	src/codegen/gencommon/dynamicFieldAccess.ml
#	src/codegen/gencommon/dynamicOperators.ml
#	src/codegen/gencommon/enumToClass.ml
#	src/codegen/gencommon/enumToClass2.ml
#	src/codegen/gencommon/expressionUnwrap.ml
#	src/codegen/gencommon/filterClosures.ml
#	src/codegen/gencommon/fixOverrides.ml
#	src/codegen/gencommon/gencommon.ml
#	src/codegen/gencommon/initFunction.ml
#	src/codegen/gencommon/overloadingConstructor.ml
#	src/codegen/gencommon/realTypeParams.ml
#	src/codegen/gencommon/reflectionCFs.ml
#	src/codegen/gencommon/switchToIf.ml
#	src/codegen/gencommon/unnecessaryCastsRemoval.ml
#	src/codegen/gencommon/unreachableCodeEliminationSynf.ml
#	src/codegen/java.ml
#	src/codegen/javaModern.ml
#	src/context/common.ml
#	src/dune
#	src/filters/filters.ml
#	src/generators/gencs.ml
#	src/generators/genjava.ml
#	src/generators/genshared.ml
#	src/optimization/analyzerTexpr.ml
#	src/typing/matcher.ml
#	src/typing/typeloadCheck.ml
#	src/typing/typeloadFields.ml
#	src/typing/typeloadModule.ml
#	src/typing/typer.ml
#	std/cs/_std/Type.hx
#	tests/server/src/cases/ServerTests.hx
# Conflicts:
#	src/codegen/gencommon/closuresToClass.ml
# Conflicts:
#	src/context/common.ml
#	src/typing/generic.ml
#	src/typing/typeload.ml
# Conflicts:
#	src-json/meta.json
#	src/codegen/dotnet.ml
#	src/codegen/java.ml
#	src/typing/strictMeta.ml
#	src/typing/typeloadCheck.ml
#	tests/runci/targets/Java.hx
#	tests/runci/targets/Jvm.hx
# Conflicts:
#	src/codegen/gencommon/castDetect.ml
#	src/codegen/gencommon/closuresToClass.ml
#	src/codegen/gencommon/dynamicFieldAccess.ml
#	src/codegen/gencommon/enumToClass.ml
#	src/codegen/gencommon/gencommon.ml
#	src/codegen/gencommon/overloadingConstructor.ml
#	src/codegen/gencommon/realTypeParams.ml
#	src/codegen/gencommon/renameTypeParameters.ml
#	src/filters/filters.ml
#	src/generators/gencs.ml
#	src/generators/genjava.ml
# Conflicts:
#	src/codegen/gencommon/gencommon.ml
#	src/context/nativeLibraryHandler.ml
#	src/generators/gencs.ml
#	src/generators/genjava.ml
# Conflicts:
#	src/codegen/gencommon/castDetect.ml
#	src/codegen/gencommon/gencommon.ml
#	src/codegen/gencommon/initFunction.ml
#	src/context/nativeLibraryHandler.ml
#	src/dune
#	src/generators/gencs.ml
#	src/generators/genjava.ml
#	std/cs/Pointer.hx
Or at least shouldn't be used...
kLabz and others added 23 commits January 31, 2024 21:39
# Conflicts:
#	src/codegen/gencommon/closuresToClass.ml
#	src/codegen/gencommon/gencommon.ml
#	src/filters/filters.ml
#	src/typing/typeloadFields.ml
#	src/typing/typeloadModule.ml
#	src/typing/typer.ml
#	tests/misc/projects/Issue10844/user-defined-define-json-fail.hxml.stderr
#	tests/misc/projects/Issue10844/user-defined-meta-json-fail.hxml.stderr
#	tests/misc/projects/Issue10844/user-defined-meta-json-indent-fail.hxml.stderr
#	tests/misc/projects/Issue10844/user-defined-meta-json-pretty-fail.hxml.stderr
# Conflicts:
#	src-json/meta.json
#	src/codegen/gencommon/normalize.ml
#	src/typing/typeloadModule.ml
@Simn
Copy link
Member Author

Simn commented Feb 6, 2024

I just went through all issues (I'm fine) and updated the list. There may be false positives in there but I'm sure people will tell us.

I'm waiting for @AlexHaxe to check the situation on benchs.haxe.org before merging because I don't want to completely break that. I'm not sure if there's any other infrastructure that needs to be updated.

@AlexHaxe
Copy link
Contributor

AlexHaxe commented Feb 6, 2024

we will have to update benchmark runner to avoid trying to run benchmarks on targets that don't exist anymore, but even without modifcation it shouldn't break entire benchmark runs.

@Simn Simn merged commit 2dfc0d9 into development Feb 6, 2024
115 of 125 checks passed
@Simn Simn deleted the remove_cs_and_java_targets branch February 6, 2024 11:10
@skial skial mentioned this pull request Feb 6, 2024
1 task
@moxie-coder
Copy link
Contributor

this gave me so many notifications

@jeremyfa
Copy link

Thanks for all the efforts keeping those Java and C# targets afloat until now, and farewell I guess 🥲. Yes, let's make Reflaxe/C# a reality! Been busy on many other subjects lately but I'd like to allocate more time in 2024 for that Reflaxe/C# target, which is a crucial part of what I'm planning for Ceramic. (ping @SomeRanDev, didn't forget that project heh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment