Skip to content
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

FCS loads #load files in the wrong order #587

Closed
matthid opened this issue Jun 18, 2016 · 1 comment
Closed

FCS loads #load files in the wrong order #587

matthid opened this issue Jun 18, 2016 · 1 comment
Labels

Comments

@matthid
Copy link
Contributor

matthid commented Jun 18, 2016

See fsprojects/FAKE#1263

Repro steps

  1. git clone https://github.com/matthid/fcs_bug_fake_1263.git
  2. ./build.sh

For details see the linked issue.
But its reproduced with

1.fsx

#load "2.fsx"
#load "3.fsx"
printfn "HELLO FROM 1"

2.fsx

#load "4.fsx"
printfn "HELLO FROM 2 %A" ``4``.T

3.fsx

#load "4.fsx"
printfn "HELLO FROM 3"

and

4.fsx

printfn "HELLO FROM 4"
type T = T

and executing 1.fsx with FSharp.Compiler.Service via EvalScriptNonThrowing.

Expected behavior

Like fsi.exe

HELLO FROM 4
HELLO FROM 2 T
HELLO FROM 4
HELLO FROM 3
HELLO FROM 1

or

HELLO FROM 4
HELLO FROM 2 T
HELLO FROM 3
HELLO FROM 1

Actual behavior

Starting Target: RunRepro (==> BuildRepro)
bin/repro/Repro.exe

F# Interactive for F# 4.0 (private)
Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

> [Loading C:\PROJ\FSharp.Compiler.Service_error_in_loadedScript\2.fsx
 Loading C:\PROJ\FSharp.Compiler.Service_error_in_loadedScript\4.fsx
 Loading C:\PROJ\FSharp.Compiler.Service_error_in_loadedScript\3.fsx
 Loading C:\PROJ\FSharp.Compiler.Service_error_in_loadedScript\1.fsx]
Stopped due to error
(Choice2Of2
   System.Exception: Operation could not be completed due to earlier error,
 [|C:\PROJ\FSharp.Compiler.Service_error_in_loadedScript\2.fsx (3,27)-(3,32) typecheck error The namespace or module '4' is not defined|])

Known workarounds

No known workaround.

Related information

  • FSharp.Compiler.Service 3.0
  • Windows 10
  • VS 2015

fsi.exe 1.fsx works as expected.

@dsyme dsyme added the bug label Jun 26, 2016
dsyme added a commit to dsyme/FSharp.Compiler.Service that referenced this issue Jul 16, 2016
fix the build of the FSharp.Compiler.Tools pack
@dsyme
Copy link
Contributor

dsyme commented Oct 13, 2016

@matthid Thank you for the bug report and excellent repro. I can confirm this is fixed at least in FCS 6.0.2 +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants