-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cosmetic] When I by mistake #load the main script, it says something about a path being too long #1263
Comments
I tested the FSI behaviour again: #r @"packages\fake\tools\fakelib.dll"
open Fake
#load "1.fsx"
printfn "HELLO"
There is also another difference between FSI and FAKE: with these 4 scripts: 1.fsx #load "2.fsx"
#load "3.fsx"
printfn "HELLO FROM 1" 2.fsx #load "4.fsx"
printfn "HELLO FROM 2" 3.fsx #load "4.fsx"
printfn "HELLO FROM 3" 4.fsx printfn "HELLO FROM 4"
In this case I actually like the FAKE behaviour better, because it only executes the side effects once, |
Interesting, This looks like a FSharp.Compiler.Service bug. Nice find.
I might send a test case to FSharp.Compiler.Service and then eventually try to fix it. But this might take a good while :). (Really) quickly looking at the source it seems like they revert the order somewhere and then maybe call distinct on the reverted list? Need to test if this happens on the latest /cc @dsyme |
I think this has since been fixed up-stream. |
Description
1.fsx
Expected behavior
FSI actually executes the script twice:
The second run fails with a fake exception, if that hadn't happened, it would probably have executed forever (or until a stackoverflowexception)
Including yourself is probably always an error, so I don't really care about that, but it should atleast print a helpful error message.
I hit this by accident with a typo and searched for about an hour what was wrong with my script.
Actual behavior
Related information
The text was updated successfully, but these errors were encountered: