Skip to content

FCS ignores source errors in #load'ed sub-scripts #586

@matthid

Description

@matthid

From fsprojects/FAKE#1262

Repro steps

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

For details see the linked issue.
But its reproduced with

1.fsx

#load "2.fsx"

``2``.func()

and

2.fsx

let func = (fun () ->
    printfn "This shouldn't work"
) )

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

Expected behavior

2.fsx(6,3): error FS0010: Unexpected symbol ')' in implementation file

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\1.fsx]
This shouldn't work

namespace FSI_0001
  val func : unit -> unit


namespace FSI_0001

(Choice1Of2 null, [||])

Known workarounds

No known workaround

Related information

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

fsi.exe 1.fsx works ie errors out as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions