fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
758 stars 189 forks source link

Publish AOT artefacts for Fantomas #3090

Open TobyShaw opened 1 month ago

TobyShaw commented 1 month ago

Please verify your pull request is respecting our Pull request ground rules. You can find more information in our Contributors documentation section.

TobyShaw commented 1 month ago

Currently getting:

root@15970d89aedc:/workspaces/fantomas/src/Fantomas# ../../artifacts/publish/Fantomas/release_linux-x64/fantomas
System.TypeLoadException: Attempted to load a type that was not created during ahead of time compilation.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowUnavailableType() + 0x27
   at Microsoft.FSharp.Core.FSharpFunc`2.InvokeFast[V](FSharpFunc`2, T, TResult) + 0x1e
   at Fargo.Fargo.map2@353.Invoke(FSharpList`1) + 0x8a
   at Fargo.Fargo.map2@353.Invoke(FSharpList`1) + 0x57
   at Fargo.Fargo.map2@353.Invoke(FSharpList`1) + 0x57

@numpsy I saw you mentioned that Fargo was AOT compatible. Did you run into this issue when testing this?

Numpsy commented 1 month ago

I have a CLI tool in a project at work that's working with Fargo in AOT.

Do you have any AOT analysis warnings in the build that suggest issues?

Numpsy commented 1 month ago

Actually, looks like it might be https://github.com/dotnet/fsharp/issues/15488 (reported by the author of Fargo)?

TobyShaw commented 1 month ago

That was it, bingo! Thanks very much for tracking that down!

TobyShaw commented 3 weeks ago

@nojaf Do you know why the builds aren't completing? I'd like to get to all green ticks before swapping the PR to be non-draft.

nojaf commented 3 weeks ago

I need to press a button to approve running CI first. I believe this is because it is your first contribution.

nojaf commented 3 weeks ago

You might also want to sync your PR with the latest main.

TobyShaw commented 3 weeks ago

Thanks!