Skip to content

#load in fsx script can fail without a proper error message #15070

Closed

Description

@jkone27

#load in fsx script can fail without a proper error message

Repro steps

this will not work

#load "./some-folder/some-script.fsx"

causing a strange/unexpected FS1141 error, not easy to troubleshoot for users.

this works

#load "some-folder/some-script.fsx"

Expected behavior

the failure to load gives a more explanative error message to the user, eventually suggesting what could be wrong, or better maybe it still loads fine in this case as both "some-folder" and "./some-folder" or "/some-folder" should all work as relative paths (?) not sure.

Actual behavior

error FS1141: Identifiers followed by '!' are reserved for future use

Known workarounds

not known

Related information

Provide any related information (optional):

  • Mac Os
  • .NET7
  • vscode

Related issue
#9417.

Activity

  1. added this to the Backlog milestone on Apr 12, 2023
  2. added
    Impact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
    and removed on Apr 17, 2023
  3. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    Tested with Microsoft (R) F# Interactive version 14.0.105.0 for F# 10.0 (dotnet fsi from SDK 10.0.105, commit a0cce49):

    #load "./path/script.fsx" (with dot-slash prefix) now works correctly — no FS1141 error.

    // some-folder2/some-script.fsx
    let hello = "world from hyphenated dir"
    // test.fsx
    #load "./some-folder2/some-script.fsx"
    open ``Some-script``
    printfn "%s" hello   // prints: world from hyphenated dir

    Both ./ and non-./ relative paths compile and run cleanly. The FS1141 "Identifiers followed by '!' are reserved for future use" error that was triggered by the dot-slash prefix is no longer present in F# 10.0.

    Generated by Repo Assist · ◷

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@9135cdfde26838a01779aa966628308404ec1f02
    
  4. added a commit that references this issue on Mar 31, 2026
  5. added a commit that references this issue on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI-thinks-issue-fixedArea-FSIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions