Better experience for __SOURCE_DIRECTORY__ in F#
The FSharp compiler macro 'SOURCE_DIRECTORY' doesn't seem to behave as expected in linqpad - specifically it points to a linqpad temporary execution directory, and not where the .linq file itself resides.
This makes it problematic to use F# type providers within linqpad. Referring to data files relative to the script is pretty common, but the path supplied to a type provider has to be a compile-time literal - ie Util.CurrentQueryPath can't be used. Absolute paths obviously break across machines.
Not sure if a fix even is possible (I can't see anywhere on the F# compiler where you can control this behavior) but thought I'd better note it for posterity.
![](https://secure.gravatar.com/avatar/56dd20706066ea345b2f02759ef6c453?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)