Possible output bug with F# program query type

edited July 2017

I've just encountered this in the latest beta (5.22.09). I'm running on Windows 10 Pro 64 bit version 1703 (build 15063.483).

When I create a new F# Program query which uses Dump to generate output, the output seems to be permanently cached after I've run the query once.

Here's a short video clip illustrating the problem: https://dl.dropboxusercontent.com/u/768836/LINQPad 5 26_07_2017 10_28_53.mp4

If I set the Always use Fresh Process Per Execution option to True in the preferences dialog, this problem goes away and the output is refreshed after every query run again.

This does not happen with C# Program queries.

Is this a bug, or is there something else going on?


  • Does it still cache the program if does something like write text to a file? Also, can you reproduce this problem on another machine?
  • I have just tried the same actions from the example on my home laptop (same version and build of Windows, running the same version of LP) and the problem does not occur.

    Changing the code seems to result in a recompilation and the output changes accordingly as I'd expect.

    I will try something which saves to a file on my work PC (the one which is exhibiting the problem) tomorrow and update this thread.
  • The same 'caching' behaviour happens on my work machine when I write to a file:

    https://dl.dropboxusercontent.com/u/768836/LINQPad 5 28_07_2017 09_51_21.mp4

    The contents of the file are not changed by the second execution of the query.

    Again, if I do this in a C# Program query the file is updated as I'd expect, so it seems like this is something to do with the F# compiler in particular?
  • Aha! I have just found the difference between my laptop and work PC: the Allow LinqPad to access internal types of other assemblies setting was enabled on my work machine and not on the laptop.

    When I disable this setting, the caching behaviour no longer happens.

    Why might that be?
  • Thanks - I've now successfully reproduced it. Will post a fix soon.

    I presume you switched on "Allow LinqPad to access internal types of other assemblies" in the first place for the benefit of C# queries, right? (I don't think this has ever been supported correctly with F#.)
  • Yep, that's correct: I switched the setting on when was doing some domain entity testing against a C# codebase a couple of months back, and then just forgot about it!
  • Brilliant, thank you. I can confirm that the fix has worked.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!