MoiraeSoftware / myriad

Myriad is a code generator for F#

Home Page:https://moiraesoftware.github.io/myriad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate output based on multiple input files

Beliar83 opened this issue · comments

I am looking into the possibility to use Godot 4.0 directly with F#, without going through C# classes as base types that the source generator can pick up, and it seems like Myriad would be the best method for that.

One thing that I can see being a problem now would be that there needs to be a [<assembly:AssemblyHasScripts>] definition.
While it can be left empty as that and Godot will use reflection to look for types (though I have not checked if that works with F#) normally it has a list of script classes. For that last to work though I would need to be able to generate input on multiple files, which does not seem to be possible, or is at least undocumented.

Its currently not possible, I would be open to a contribution if you could explain the rules and parameters etc.

So let me get this correct, you need to look at a list of assemblies and find those with AssemblyHasScripts then generate files based on something inside that assembly and bundle it into one file per assembly?

Why not just bundle them in one file with namespaces for the things generated, assuming the assemblies don't have namespace clashes.

Or is it that the generated stuff needs that attribute, maybe make the attribute conditional to something myriad generates if that's the case.

This attribute needs to be generated, and contain a list of types. It can only appear once for an assembly.
This is not important for this case any more, though, as it was decided to use a different approach which does not need the F# generators to generate this attribute.

So should I just close this if it is no longer of interest?

Unless someone else needs it, sure.