Skip to content

Stack overflows when compiling FSharp.Data.Tests in debug mode #1410

Closed

Description

@dsyme

I'm getting some stack overflows when compiling FSharp.Data.Tests in this repo in "Debug" mode

This is because the lack of tailcalls in the type provider when compiled as Debug means it can't cope with large inputs

A typical chunk of a failing stack is below:

   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@269[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(Microsoft.FSharp.Core.Unit)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+clo@265-168[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(System.Tuple`2<System.String,FSharp.Data.JsonValue>)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+clo@253-167[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(FSharp.Data.JsonValue)
   at FSharp.Data.JsonParser.parseValue[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<FSharp.Data.JsonValue,System.__Canon>)
   at FSharp.Data.JsonParser.parsePair[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<System.Tuple`2<System.String,FSharp.Data.JsonValue>,System.__Canon>)
   at FSharp.Data.JsonParser.parseObject[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<FSharp.Data.JsonValue,System.__Canon>)
   at FSharp.Data.JsonParser.parseValue[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<FSharp.Data.JsonValue,System.__Canon>)
   at FSharp.Data.JsonParser.parsePair[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<System.Tuple`2<System.String,FSharp.Data.JsonValue>,System.__Canon>)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@269[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(Microsoft.FSharp.Core.Unit)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@272-1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(System.Tuple`2<System.String,FSharp.Data.JsonValue>)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+clo@253-167[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(FSharp.Data.JsonValue)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parseObjectEnd@261[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(Microsoft.FSharp.Core.Unit)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@269[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(Microsoft.FSharp.Core.Unit)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@272-1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(System.Tuple`2<System.String,FSharp.Data.JsonValue>)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+clo@253-167[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(FSharp.Data.JsonValue)
   at FSharp.Data.JsonParser.parseValue[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<FSharp.Data.JsonValue,System.__Canon>)
   at FSharp.Data.JsonParser.parsePair[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<System.Tuple`2<System.String,FSharp.Data.JsonValue>,System.__Canon>)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@269[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(Microsoft.FSharp.Core.Unit)
   at <StartupCode$FSharp-Data-DesignTime>.$JsonValue+parsePairItem@272-1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Invoke(System.Tuple`2<System.String,FSharp.Data.JsonValue>

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions