Added F# Support to BepInEx.PluginInfoProps #18
+38
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expands functionality of BepInEx.PluginInfoProps' auto-generation.
I won't get into the debate of using F# to mod, but adding support is somewhat trivial, with the exception of F#'s dependency-based compilation order throwing a wrench in the plans. Thankfully, or maybe regrettably, detecting the language via project file extension is easy enough to then determine file contents, extension, and how we handle compilation insertion.
Traditionally, the <Compile> is all that's necessary, but FSharp's compiler will take that as the final file and so it won't be visible by any <Compile> files declared before it (which is all the .fsproj files). In order to avoid this, we store the compile into an interim item and reinsert it after we add MyPluginInfo's compile tag. Woohoo, just like that we supprt MyPluginInfo goodness in a few more mods in all of the ecosystem; but hey! "Functionality" (ᵖˡᵘˢ ⁱ'ᵈ ˡᵒᵛᵉ ⁱᵗ ˡᵒˡ)