{"action":"opened","issue":{"url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/797","repository_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service","labels_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/797/labels{/name}","comments_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/797/comments","events_url":"https://api.github.com/repos/fsharp/FSharp.Compiler.Service/issues/797/events","html_url":"https://github.com/fsharp/FSharp.Compiler.Service/issues/797","id":253722419,"number":797,"title":"`FSharp.Formatting` error while using `FSharp.Data`'s CsvProvider in ProjectScaffold.","user":{"login":"oscarvarto","id":1676245,"avatar_url":"https://avatars1.githubusercontent.com/u/1676245?v=4","gravatar_id":"","url":"https://api.github.com/users/oscarvarto","html_url":"https://github.com/oscarvarto","followers_url":"https://api.github.com/users/oscarvarto/followers","following_url":"https://api.github.com/users/oscarvarto/following{/other_user}","gists_url":"https://api.github.com/users/oscarvarto/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarvarto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarvarto/subscriptions","organizations_url":"https://api.github.com/users/oscarvarto/orgs","repos_url":"https://api.github.com/users/oscarvarto/repos","events_url":"https://api.github.com/users/oscarvarto/events{/privacy}","received_events_url":"https://api.github.com/users/oscarvarto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-29T16:13:18Z","updated_at":"2017-08-29T16:13:18Z","closed_at":null,"body":"### Description\r\n\r\nAdding `type Stocks = CsvProvider<\"./data/MSFT.csv\">` to `https://github.com/fsprojects/ProjectScaffold/blob/master/src/FSharp.ProjectTemplate/Library.fs` causes a FSharp.Formatting Error\r\n\r\n### Repro steps\r\n\r\nPlease provide the steps required to reproduce the problem\r\n\r\n1.a Use `forge new scaffold` to create a new Scaffold.\r\n1.b Add `nuget FSharp.Data` to `group Build` in `paket.dependencies`: https://github.com/fsprojects/ProjectScaffold/blob/master/paket.dependencies#L18\r\n1.c Modify `https://github.com/fsprojects/ProjectScaffold/blob/master/src/FSharp.ProjectTemplate/Library.fs` and call CsvProvider (something like this):\r\n\r\n```fsharp\r\nnamespace ProcessingData\r\n\r\nopen FSharp.Data\r\n\r\n/// Stock prices example\r\ntype Stocks = CsvProvider<\"./data/MSFT.csv\">\r\n\r\n/// Documentation for my library\r\n///\r\n/// ## Example\r\n///\r\n///     let h = Library.hello 1\r\n///     printfn \"%d\" h\r\n///\r\nmodule Library = \r\n  /// Returns 42\r\n  ///\r\n  /// ## Parameters\r\n  ///  - `num` - whatever\r\n  let hello num = 42\r\n```\r\n\r\n 1.d Add a `data` folder inside project folder (in my case [root project folder]/src/ProcessingData) and put http://fsharp.github.io/FSharp.Data/data/MSFT.csv inside it.\r\n\r\n2. Use `.\\build.cmd` to run all the targets.\r\n\r\n### Expected behavior\r\n\r\nBuild correctly.\r\n\r\n### Actual behavior\r\nI am getting the following error for `GenerateReferenceDocs` target:\r\n\r\n```text\r\nStarting Target: GenerateReferenceDocs (==> RunTests, GenerateHelp)                                                                                                      \r\nBuilding documentation (Default), this could take some time, please wait...                                                                                              \r\nC:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\packages\\build\\FAKE\\tools\\FAKE.exe  --fsiargs -d:FAKE -d:RELEASE -d:REFERENCE \"generate.fsx\"                      \r\nFSharp.Formatting Information: 0 : FSharp.Formatting Logging setup!                                                                                                      \r\nYaaf.FSharp.Scripting Information: 0 : Yaaf.FSharp.Scripting Logging setup!                                                                                              \r\nCopying file: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\img\\logo-template.pdn                                                                          \r\nCopying file: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\img\\logo.png                                                                                   \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\style.css                                                                \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\style.css.bak                                                            \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\style_light.css                                                          \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\tips.js                                                                  \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\img\\github-blue.png                                                      \r\nCopying styles and scripts: C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docs\\content\\img\\github.png                                                           \r\nDeleting contents of C:\\Users\\oscarvarto\\gitRepos\\dotnetWork\\ProcessingData\\docsrc\\tools\\../../docs\\reference                                                            \r\nFSharp.Formatting Error: 0 : Could not read comments from entity 'ProcessingData.Stocks': Microsoft.FSharp.Compiler.ErrorLogger+ReportedError: Exception of type 'Microso\r\nft.FSharp.Compiler.Tast+InternalUndefinedItemRef' was thrown.                                                                                                            \r\n   at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.Error[b](ErrorLogger x, Exception exn) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fs\r\nharp\\ErrorLogger.fs:line 313                                                                                                                                             \r\n   at Microsoft.FSharp.Compiler.Tast.EntityRef.get_Deref() in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\tast.fs:line 2684                                    \r\n   at Microsoft.FSharp.Compiler.Tastops.stripTyEqnsA(TcGlobals g, Boolean canShortcut, TType ty) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\TastOps.fs:line\r\n 627                                                                                                                                                                     \r\n   at Microsoft.FSharp.Compiler.Tastops.extensionInfoOfTy(TcGlobals g, TType ty) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\TastOps.fs:line 1464           \r\n   at Microsoft.FSharp.Compiler.Tastops.metadataOfTy(TcGlobals g, TType ty) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\TastOps.fs:line 1489                \r\n   at Microsoft.FSharp.Compiler.Infos.GetImmediateIntrinsicPropInfosOfType(FSharpOption`1 optFilter, AccessorDomain ad, TcGlobals g, ImportMap amap, range m, TType typ) \r\nin C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\infos.fs:line 3293                                                                                              \r\n   at <StartupCode$FSharp-Compiler-Service>.$Symbols.get_MembersFunctionsAndValues@412-1.GenerateNext(IEnumerable`1& next) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\\r\nsrc\\fsharp\\vs\\Symbols.fs:line 426                                                                                                                                        \r\n   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()                                                                                      \r\n   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext()                                                           \r\n   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)                                                                                             \r\n   at <StartupCode$FSharp-Compiler-Service>.$Symbols.get_MembersFunctionsAndValues@411.Invoke(Unit unitVar0) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\vs\\\r\nSymbols.fs:line 412                                                                                                                                                      \r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.Impl.protect[a](FSharpFunc`2 f) in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\vs\\Symbols.fs:line 27        \r\n   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity.get_MembersFunctionsAndValues() in C:\\Users\\robin\\dev\\FSharp.Compiler.Service\\src\\fsharp\\vs\\Symbols.fs:li\r\nne 411                                                                                                                                                                   \r\n   at FSharp.MetadataFormat.Reader.getMembers@1059-1.GenerateNext(IEnumerable`1& next) in c:\\Tomas\\Public\\tpetricek\\FSharp.Formatting\\src\\FSharp.MetadataFormat\\Main.fs:l\r\nine 0                                                                                                                                                                    \r\n   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()                                                                                      \r\n   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext()                                                           \r\n   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)                                                                                             \r\n   at FSharp.MetadataFormat.Reader.readType@1055.Invoke(String cat, IDictionary`2 cmds, Comment comment) in c:\\Tomas\\Public\\tpetricek\\FSharp.Formatting\\src\\FSharp.Metada\r\ntaFormat\\Main.fs:line 1070                                                                                                                                               \r\n   at FSharp.MetadataFormat.Reader.readCommentsInto[a](FSharpSymbol sym, ReadingContext ctx, String xmlDoc, FSharpFunc`2 f) in c:\\Tomas\\Public\\tpetricek\\FSharp.Formattin\r\ng\\src\\FSharp.MetadataFormat\\Main.fs:line 944                                                                                                                             \r\nFSharp.Formatting Information: 0 : Starting razor engine                                                                                                                 \r\nFSharp.Formatting Information: 0 : Generating: index.html                                                                                                                \r\nFSharp.Formatting Information: 0 : Generating modules...                                                                                                                 \r\nFSharp.Formatting Information: 0 : Generating module: processingdata-library                                                                                             \r\nFSharp.Formatting Information: 0 : Finished module: processingdata-library                                                                                               \r\nFSharp.Formatting Information: 0 : Generating types...                                                                                                                   \r\nFinished Target: GenerateReferenceDocs\r\n````\r\n\r\n### Known workarounds\r\nNone yet :(\r\n\r\n### Related information \r\n\r\n* Operating system\r\nWindows 10 Pro 64 bits (running on top of Parallels 12 for Mac).\r\n\r\n* Branch\r\n\r\n* .NET Runtime, CoreCLR or Mono Version\r\nI have configured framework in Solutions's `paket.dependencies` to be\r\n\r\n```\r\nframework: >= net461\r\n``` \r\n\r\n** Verifying the fsc version: \r\n```\r\nfsc --help\r\nMicrosoft (R) F# Compiler version 4.1\r\n```\r\n\r\n* I have already installed VS 2017 15.3.2\r\n\r\n* `PATH` Environment variables: \r\n\r\n```text\r\nPS C:\\Users\\oscarvarto> $env:path.split(\";\")\r\nC:\\Program Files\\ConEmu\\ConEmu\\Scripts\r\nC:\\Program Files\\ConEmu\r\nC:\\Program Files\\ConEmu\\ConEmu\r\nC:\\Program Files (x86)\\Parallels\\Parallels Tools\\Applications\r\nC:\\Windows\\system32\r\nC:\\Windows\r\nC:\\Windows\\System32\\Wbem\r\nC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\\r\nC:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\\r\nC:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\\r\nC:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\ManagementStudio\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\120\\DTS\\Binn\\\r\nC:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\\r\nC:\\Program Files\\dotnet\\\r\nC:\\Program Files (x86)\\Xoreax\\IncrediBuild\r\nC:\\Program Files\\Git\\cmd\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\\r\nC:\\ProgramData\\chocolatey\\bin\r\nC:\\Program Files (x86)\\Microsoft SDKs\\F#\\4.1\\Framework\\v4.0\r\nC:\\Users\\oscarvarto\\scoop\\shims\r\nC:\\Users\\oscarvarto\\AppData\\Local\\Microsoft\\WindowsApps\r\n```\r\n\r\n* `FSHARPINSTALLDIR` pointing to `C:\\Program Files (x86)\\Microsoft SDKs\\F#\\4.1\\Framework\\v4.0\\` (I guess VS 2017 installation added that)."}}
{"actor":{"display_login":"oscarvarto"}}