[Trace - 12:52:17 AM] Sending request 'initialize - (0)'. Params: { "processId": 34841, "clientInfo": { "name": "Visual Studio Code", "version": "1.68.1" }, "locale": "en-gb", "rootPath": "/Users/cristianocalcagno/GitHub/rescript-compiler", "rootUri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler", "capabilities": { "workspace": { "applyEdit": true, "workspaceEdit": { "documentChanges": true, "resourceOperations": [ "create", "rename", "delete" ], "failureHandling": "textOnlyTransactional", "normalizesLineEndings": true, "changeAnnotationSupport": { "groupsOnLabel": true } }, "didChangeConfiguration": { "dynamicRegistration": true }, "didChangeWatchedFiles": { "dynamicRegistration": true }, "symbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] }, "tagSupport": { "valueSet": [ 1 ] } }, "codeLens": { "refreshSupport": true }, "executeCommand": { "dynamicRegistration": true }, "configuration": true, "workspaceFolders": true, "semanticTokens": { "refreshSupport": true }, "fileOperations": { "dynamicRegistration": true, "didCreate": true, "didRename": true, "didDelete": true, "willCreate": true, "willRename": true, "willDelete": true } }, "textDocument": { "publishDiagnostics": { "relatedInformation": true, "versionSupport": false, "tagSupport": { "valueSet": [ 1, 2 ] }, "codeDescriptionSupport": true, "dataSupport": true }, "synchronization": { "dynamicRegistration": true, "willSave": true, "willSaveWaitUntil": true, "didSave": true }, "completion": { "dynamicRegistration": true, "contextSupport": true, "completionItem": { "snippetSupport": true, "commitCharactersSupport": true, "documentationFormat": [ "markdown", "plaintext" ], "deprecatedSupport": true, "preselectSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "insertReplaceSupport": true, "resolveSupport": { "properties": [ "documentation", "detail", "additionalTextEdits" ] }, "insertTextModeSupport": { "valueSet": [ 1, 2 ] } }, "completionItemKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] } }, "hover": { "dynamicRegistration": true, "contentFormat": [ "markdown", "plaintext" ] }, "signatureHelp": { "dynamicRegistration": true, "signatureInformation": { "documentationFormat": [ "markdown", "plaintext" ], "parameterInformation": { "labelOffsetSupport": true }, "activeParameterSupport": true }, "contextSupport": true }, "definition": { "dynamicRegistration": true, "linkSupport": true }, "references": { "dynamicRegistration": true }, "documentHighlight": { "dynamicRegistration": true }, "documentSymbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] }, "hierarchicalDocumentSymbolSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "labelSupport": true }, "codeAction": { "dynamicRegistration": true, "isPreferredSupport": true, "disabledSupport": true, "dataSupport": true, "resolveSupport": { "properties": [ "edit" ] }, "codeActionLiteralSupport": { "codeActionKind": { "valueSet": [ "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" ] } }, "honorsChangeAnnotations": false }, "codeLens": { "dynamicRegistration": true }, "formatting": { "dynamicRegistration": true }, "rangeFormatting": { "dynamicRegistration": true }, "onTypeFormatting": { "dynamicRegistration": true }, "rename": { "dynamicRegistration": true, "prepareSupport": true, "prepareSupportDefaultBehavior": 1, "honorsChangeAnnotations": true }, "documentLink": { "dynamicRegistration": true, "tooltipSupport": true }, "typeDefinition": { "dynamicRegistration": true, "linkSupport": true }, "implementation": { "dynamicRegistration": true, "linkSupport": true }, "colorProvider": { "dynamicRegistration": true }, "foldingRange": { "dynamicRegistration": true, "rangeLimit": 5000, "lineFoldingOnly": true }, "declaration": { "dynamicRegistration": true, "linkSupport": true }, "selectionRange": { "dynamicRegistration": true }, "callHierarchy": { "dynamicRegistration": true }, "semanticTokens": { "dynamicRegistration": true, "tokenTypes": [ "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator" ], "tokenModifiers": [ "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" ], "formats": [ "relative" ], "requests": { "range": true, "full": { "delta": true } }, "multilineTokenSupport": false, "overlappingTokenSupport": false }, "linkedEditingRange": { "dynamicRegistration": true } }, "window": { "showMessage": { "messageActionItem": { "additionalPropertiesSupport": true } }, "showDocument": { "support": true }, "workDoneProgress": true }, "general": { "regularExpressions": { "engine": "ECMAScript", "version": "ES2020" }, "markdown": { "parser": "marked", "version": "1.1.0" } }, "experimental": { "jumpToNextHole": true } }, "trace": "verbose", "workspaceFolders": [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler", "name": "rescript-compiler" } ] } [Trace - 12:52:17 AM] Received notification 'window/logMessage'. Params: { "type": 3, "message": "Connecting to dune /Users/cristianocalcagno/GitHub/rescript-compiler (/Users/cristianocalcagno/GitHub/rescript-compiler/_build/.rpc/dune)" } [Info - 12:52:17 AM] Connecting to dune /Users/cristianocalcagno/GitHub/rescript-compiler (/Users/cristianocalcagno/GitHub/rescript-compiler/_build/.rpc/dune) [Trace - 12:52:17 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "workspace /Users/cristianocalcagno/GitHub/rescript-compiler ignores 2 dune instances" } [Error - 12:52:17 AM] workspace /Users/cristianocalcagno/GitHub/rescript-compiler ignores 2 dune instances [Trace - 12:52:17 AM] Received response 'initialize - (0)' in 295ms. Result: { "capabilities": { "textDocumentSync": { "openClose": true, "change": 2, "willSave": false, "willSaveWaitUntil": false, "save": true }, "completionProvider": { "triggerCharacters": [ ".", "#" ], "resolveProvider": true }, "hoverProvider": true, "signatureHelpProvider": { "triggerCharacters": [ " ", "~", "?", ":", "(" ] }, "declarationProvider": true, "definitionProvider": true, "typeDefinitionProvider": true, "referencesProvider": true, "documentHighlightProvider": true, "documentSymbolProvider": true, "codeActionProvider": { "codeActionKinds": [ "quickfix", "construct", "destruct", "inferred_intf", "put module name in identifiers", "remove module name from identifiers", "type-annotate" ] }, "codeLensProvider": { "resolveProvider": false }, "documentFormattingProvider": true, "renameProvider": { "prepareProvider": true }, "foldingRangeProvider": true, "executeCommandProvider": { "commands": [ "dune/promote" ] }, "selectionRangeProvider": true, "workspaceSymbolProvider": true, "workspace": { "workspaceFolders": { "supported": true, "changeNotifications": true } }, "experimental": { "ocamllsp": { "interfaceSpecificLangId": true, "handleSwitchImplIntf": true, "handleInferIntf": true, "handleTypedHoles": true, "handleWrappingAstNode": true, "diagnostic_promotions": true } } }, "serverInfo": { "name": "ocamllsp", "version": "1.11.6" } } [Trace - 12:52:17 AM] Sending notification 'initialized'. Params: {} [Trace - 12:52:17 AM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml", "languageId": "ocaml", "version": 1, "text": "(* Copyright (C) 2015 - 2016 Bloomberg Finance L.P.\n * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * In addition to the permissions granted to you by the LGPL, you may combine\n * or link a \"work that uses the Library\" with a publicly distributed version\n * of this file to produce a combined library or application, then distribute\n * that combined work under the terms of your choosing, with no requirement\n * to comply with the obligations normally placed on you by section 4 of the\n * LGPL version 3 (or the corresponding section of a later version of the LGPL\n * should you choose to use a later version).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)\n\n(* let get_list_string = Bsb_build_util.get_list_string *)\nlet ( // ) = Ext_path.combine\n\nlet resolve_package cwd package_name =\n let x = Bsb_pkg.resolve_bs_package ~cwd package_name in\n {\n Bsb_config_types.package_name;\n package_install_path = x // Bsb_config.lib_ocaml;\n }\n\ntype json_map = Ext_json_types.t Map_string.t\n\n(* Key is the path *)\nlet ( |? ) m (key, cb) = m |> Ext_json.test key cb\n\nlet ( .?() ) = Map_string.find_opt\n\n(*TODO: it is a little mess that [cwd] and [project dir] are shared*)\n\nlet extract_package_name_and_namespace (map : json_map) : string * string option\n =\n let package_name =\n match map.?(Bsb_build_schemas.name) with\n | Some (Str { str = \"_\" } as config) ->\n Bsb_exception.config_error config \"_ is a reserved package name\"\n | Some (Str { str = name }) -> name\n | Some config ->\n Bsb_exception.config_error config \"name expect a string field\"\n | None -> Bsb_exception.invalid_spec \"field name is required\"\n in\n let namespace =\n match map.?(Bsb_build_schemas.namespace) with\n | None | Some (False _) -> None\n | Some (True _) ->\n Some (Ext_namespace.namespace_of_package_name package_name)\n | Some (Str { str }) ->\n (*TODO : check the validity of namespace *)\n Some (Ext_namespace.namespace_of_package_name str)\n | Some x ->\n Bsb_exception.config_error x \"namespace field expects string or boolean\"\n in\n (package_name, namespace)\n\n(**\n There are two things to check:\n - the running bsb and vendoring bsb is the same\n - the running bsb need delete stale build artifacts\n (kinda check npm upgrade)\n\n Note if the setup is correct: \n the running compiler and node_modules/rescript\n should be the same version, \n The exact check is that the running compiler should have a \n compatible runtime version installed, the location of the\n compiler is actually not relevant.\n We disable the check temporarily\n e.g,\n ```\n bsc -runtime runtime_dir@version\n ```\n*)\nlet check_stdlib (map : json_map) : bool =\n (*built_in_package*)\n match map.?(Bsb_build_schemas.use_stdlib) with\n | Some (False _) -> false\n | None | Some _ -> true\n\nlet extract_gentype_config (map : json_map) cwd :\n Bsb_config_types.gentype_config option =\n match map.?(Bsb_build_schemas.gentypeconfig) with\n | None -> None\n | Some (Obj { map = obj }) ->\n Some\n {\n path =\n (match obj.?(Bsb_build_schemas.path) with\n | None ->\n (Bsb_build_util.resolve_bsb_magic_file ~cwd ~desc:\"gentype.exe\"\n \"gentype/gentype.exe\")\n .path\n | Some (Str { str }) ->\n (Bsb_build_util.resolve_bsb_magic_file ~cwd ~desc:\"gentype.exe\"\n str)\n .path\n | Some config ->\n Bsb_exception.config_error config \"path expect to be a string\");\n }\n | Some config ->\n Bsb_exception.config_error config \"gentypeconfig expect an object\"\n\nlet extract_string (map : json_map) (field : string) cb =\n match map.?(field) with\n | None -> None\n | Some (Str { str }) -> cb str\n | Some config -> Bsb_exception.config_error config (field ^ \" expect a string\")\n\nlet extract_boolean (map : json_map) (field : string) (default : bool) : bool =\n match map.?(field) with\n | None -> default\n | Some (True _) -> true\n | Some (False _) -> false\n | Some config ->\n Bsb_exception.config_error config (field ^ \" expect a boolean\")\n\nlet extract_reason_react_jsx (map : json_map) =\n let default : Bsb_config_types.reason_react_jsx option ref = ref None in\n map\n |? ( Bsb_build_schemas.reason,\n `Obj\n (fun m ->\n match m.?(Bsb_build_schemas.react_jsx) with\n | Some (Flo { loc; flo }) -> (\n match flo with\n | \"3\" -> default := Some Jsx_v3\n | _ -> Bsb_exception.errorf ~loc \"Unsupported jsx version %s\" flo\n )\n | Some x ->\n Bsb_exception.config_error x\n \"Unexpected input (expect a version number) for jsx, note \\\n boolean is no longer allowed\"\n | None -> ()) )\n |> ignore;\n !default\n\nlet extract_warning (map : json_map) =\n match map.?(Bsb_build_schemas.warnings) with\n | None -> Bsb_warning.use_default\n | Some (Obj { map }) -> Bsb_warning.from_map map\n | Some config -> Bsb_exception.config_error config \"expect an object\"\n\nlet extract_ignored_dirs (map : json_map) : Set_string.t =\n match map.?(Bsb_build_schemas.ignored_dirs) with\n | None -> Set_string.empty\n | Some (Arr { content }) ->\n Set_string.of_list (Bsb_build_util.get_list_string content)\n | Some config -> Bsb_exception.config_error config \"expect an array of string\"\n\nlet extract_pinned_dependencies (map : json_map) : Set_string.t =\n match map.?(Bsb_build_schemas.pinned_dependencies) with\n | None -> Set_string.empty\n | Some (Arr { content }) ->\n Set_string.of_list (Bsb_build_util.get_list_string content)\n | Some config -> Bsb_exception.config_error config \"expect an array of string\"\n\nlet extract_generators (map : json_map) =\n let generators = ref Map_string.empty in\n (match map.?(Bsb_build_schemas.generators) with\n | None -> ()\n | Some (Arr { content = s }) ->\n generators :=\n Ext_array.fold_left s Map_string.empty (fun acc json ->\n match json with\n | Obj { map = m; loc } -> (\n match\n (m.?(Bsb_build_schemas.name), m.?(Bsb_build_schemas.command))\n with\n | Some (Str { str = name }), Some (Str { str = command }) ->\n Map_string.add acc name command\n | _, _ ->\n Bsb_exception.errorf ~loc\n {| generators exepect format like { \"name\" : \"cppo\", \"command\" : \"cppo $in -o $out\"} |}\n )\n | _ -> acc)\n | Some config ->\n Bsb_exception.config_error config\n (Bsb_build_schemas.generators ^ \" expect an array field\"));\n !generators\n\nlet extract_dependencies (map : json_map) cwd (field : string) :\n Bsb_config_types.dependencies =\n match map.?(field) with\n | None -> []\n | Some (Arr { content = s }) ->\n Ext_list.map (Bsb_build_util.get_list_string s) (fun s ->\n resolve_package cwd (Bsb_pkg_types.string_as_package s))\n | Some config -> Bsb_exception.config_error config (field ^ \" expect an array\")\n\n(* return an empty array if not found *)\nlet extract_string_list (map : json_map) (field : string) : string list =\n match map.?(field) with\n | None -> []\n | Some (Arr { content = s }) -> Bsb_build_util.get_list_string s\n | Some config -> Bsb_exception.config_error config (field ^ \" expect an array\")\n\nlet extract_ppx (map : json_map) (field : string) ~(cwd : string) :\n Bsb_config_types.ppx list =\n match map.?(field) with\n | None -> []\n | Some (Arr { content }) ->\n let resolve s =\n if s = \"\" then\n Bsb_exception.invalid_spec \"invalid ppx, empty string found\"\n else\n (Bsb_build_util.resolve_bsb_magic_file ~cwd\n ~desc:Bsb_build_schemas.ppx_flags s)\n .path\n in\n Ext_array.to_list_f content (fun x ->\n match x with\n | Str x -> { Bsb_config_types.name = resolve x.str; args = [] }\n | Arr { content } -> (\n let xs = Bsb_build_util.get_list_string content in\n match xs with\n | [] -> Bsb_exception.config_error x \" empty array is not allowed\"\n | name :: args -> { Bsb_config_types.name = resolve name; args })\n | config ->\n Bsb_exception.config_error config\n (field ^ \"expect each item to be either string or array\"))\n | Some config -> Bsb_exception.config_error config (field ^ \" expect an array\")\n\nlet extract_js_post_build (map : json_map) cwd : string option =\n let js_post_build_cmd = ref None in\n map\n |? ( Bsb_build_schemas.js_post_build,\n `Obj\n (fun m ->\n m\n |? ( Bsb_build_schemas.cmd,\n `Str\n (fun s ->\n js_post_build_cmd :=\n Some\n (Bsb_build_util.resolve_bsb_magic_file ~cwd\n ~desc:Bsb_build_schemas.js_post_build s)\n .path) )\n |> ignore) )\n |> ignore;\n !js_post_build_cmd\n\n(** ATT: make sure such function is re-entrant. \n With a given [cwd] it works anywhere*)\nlet interpret_json ~(package_kind : Bsb_package_kind.t) ~(per_proj_dir : string)\n : Bsb_config_types.t =\n (* we should not resolve it too early,\n since it is external configuration, no {!Bsb_build_util.convert_and_resolve_path}\n *)\n\n (* When we plan to add more deps here,\n Make sure check it is consistent that for nested deps, we have a\n quck check by just re-parsing deps\n Make sure it works with [-make-world] [-clean-world]\n *)\n\n (* Setting ninja is a bit complex\n 1. if [build.ninja] does use [ninja] we need set a variable\n 2. we need store it so that we can call ninja correctly\n *)\n match\n Ext_json_parse.parse_json_from_file (per_proj_dir // Literals.bsconfig_json)\n with\n | Obj { map } -> (\n let package_name, namespace = extract_package_name_and_namespace map in\n let gentype_config = extract_gentype_config map per_proj_dir in\n\n (* This line has to be before any calls to Bsb_global_backend.backend, because it'll read the entries\n array from the bsconfig and set the backend_ref to the first entry, if any. *)\n\n (* The default situation is empty *)\n let built_in_package : bool = check_stdlib map in\n\n let pp_flags : string option =\n extract_string map Bsb_build_schemas.pp_flags (fun p ->\n if p = \"\" then\n Bsb_exception.invalid_spec \"invalid pp, empty string found\"\n else\n Some\n (Bsb_build_util.resolve_bsb_magic_file ~cwd:per_proj_dir\n ~desc:Bsb_build_schemas.pp_flags p)\n .path)\n in\n let reason_react_jsx = extract_reason_react_jsx map in\n let bs_dependencies =\n extract_dependencies map per_proj_dir Bsb_build_schemas.bs_dependencies\n in\n let bs_dev_dependencies =\n match package_kind with\n | Toplevel | Pinned_dependency _ ->\n extract_dependencies map per_proj_dir\n Bsb_build_schemas.bs_dev_dependencies\n | Dependency _ -> []\n in\n let pinned_dependencies = extract_pinned_dependencies map in\n match map.?(Bsb_build_schemas.sources) with\n | Some sources ->\n let cut_generators =\n extract_boolean map Bsb_build_schemas.cut_generators false\n in\n let groups =\n Bsb_parse_sources.scan ~ignored_dirs:(extract_ignored_dirs map)\n ~package_kind ~root:per_proj_dir ~cut_generators\n (* ~namespace *)\n sources\n in\n {\n pinned_dependencies;\n gentype_config;\n package_name;\n namespace;\n warning = extract_warning map;\n external_includes =\n extract_string_list map Bsb_build_schemas.bs_external_includes;\n bsc_flags = extract_string_list map Bsb_build_schemas.bsc_flags;\n ppx_files =\n extract_ppx map ~cwd:per_proj_dir Bsb_build_schemas.ppx_flags;\n pp_file = pp_flags;\n bs_dependencies;\n bs_dev_dependencies;\n (*\n reference for quoting\n {[\n let tmpfile = Filename.temp_file \"ocamlpp\" \"\" in\n let comm = Printf.sprintf \"%s %s > %s\"\n pp (Filename.quote sourcefile) tmpfile\n in\n ]}\n *)\n js_post_build_cmd = extract_js_post_build map per_proj_dir;\n package_specs =\n (match package_kind with\n | Toplevel -> Bsb_package_specs.from_map ~cwd:per_proj_dir map\n | Pinned_dependency x | Dependency x -> x);\n file_groups = groups;\n files_to_install = Queue.create ();\n built_in_dependency = built_in_package;\n generate_merlin =\n extract_boolean map Bsb_build_schemas.generate_merlin false;\n reason_react_jsx;\n generators = extract_generators map;\n cut_generators;\n }\n | None ->\n Bsb_exception.invalid_spec \"no sources specified in bsconfig.json\")\n | _ -> Bsb_exception.invalid_spec \"bsconfig.json expect a json object {}\"\n\nlet package_specs_from_bsconfig () =\n let json = Ext_json_parse.parse_json_from_file Literals.bsconfig_json in\n match json with\n | Obj { map } ->\n ( Bsb_package_specs.from_map ~cwd:Bsb_global_paths.cwd map,\n extract_pinned_dependencies map )\n | _ -> assert false\n" } } [Trace - 12:52:17 AM] Received notification 'window/logMessage'. Params: { "type": 3, "message": "client 0: connecting..." } [Info - 12:52:17 AM] client 0: connecting... [Trace - 12:52:17 AM] Received request 'client/registerCapability - (1)'. Params: { "registrations": [ { "id": "ocamllsp-cram-dune-files/textDocument/didOpen", "method": "textDocument/didOpen", "registerOptions": { "documentSelector": [ { "language": "cram" }, { "language": "dune" }, { "language": "dune-project" }, { "language": "dune-workspace" } ] } }, { "id": "ocamllsp-cram-dune-files/textDocument/didClose", "method": "textDocument/didClose", "registerOptions": { "documentSelector": [ { "language": "cram" }, { "language": "dune" }, { "language": "dune-project" }, { "language": "dune-workspace" } ] } } ] } [Trace - 12:52:17 AM] Sending response 'client/registerCapability - (1)'. Processing request took 0ms No result returned. [Trace - 12:52:17 AM] Received notification 'window/logMessage'. Params: { "type": 3, "message": "client 0: connected to dune at unix:///Users/cristianocalcagno/GitHub/rescript-compiler/_build/.rpc/dune" } [Info - 12:52:17 AM] client 0: connected to dune at unix:///Users/cristianocalcagno/GitHub/rescript-compiler/_build/.rpc/dune [Trace - 12:52:18 AM] Sending request 'textDocument/foldingRange - (1)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" } } [Trace - 12:52:18 AM] Received response 'textDocument/foldingRange - (1)' in 17ms. Result: [ { "startLine": 27, "startCharacter": 0, "endLine": 32, "endCharacter": 3, "kind": "region" }, { "startLine": 29, "startCharacter": 2, "endLine": 32, "endCharacter": 3, "kind": "region" }, { "startLine": 43, "startCharacter": 0, "endLine": 65, "endCharacter": 27, "kind": "region" }, { "startLine": 45, "startCharacter": 2, "endLine": 52, "endCharacter": 65, "kind": "region" }, { "startLine": 46, "startCharacter": 4, "endLine": 52, "endCharacter": 65, "kind": "region" }, { "startLine": 47, "startCharacter": 40, "endLine": 48, "endCharacter": 72, "kind": "region" }, { "startLine": 50, "startCharacter": 17, "endLine": 51, "endCharacter": 70, "kind": "region" }, { "startLine": 54, "startCharacter": 2, "endLine": 63, "endCharacter": 80, "kind": "region" }, { "startLine": 55, "startCharacter": 4, "endLine": 63, "endCharacter": 80, "kind": "region" }, { "startLine": 57, "startCharacter": 19, "endLine": 58, "endCharacter": 67, "kind": "region" }, { "startLine": 59, "startCharacter": 24, "endLine": 61, "endCharacter": 58, "kind": "region" }, { "startLine": 62, "startCharacter": 12, "endLine": 63, "endCharacter": 80, "kind": "region" }, { "startLine": 85, "startCharacter": 0, "endLine": 89, "endCharacter": 25, "kind": "region" }, { "startLine": 87, "startCharacter": 2, "endLine": 89, "endCharacter": 25, "kind": "region" }, { "startLine": 91, "startCharacter": 0, "endLine": 112, "endCharacter": 72, "kind": "region" }, { "startLine": 93, "startCharacter": 2, "endLine": 112, "endCharacter": 72, "kind": "region" }, { "startLine": 95, "startCharacter": 28, "endLine": 110, "endCharacter": 9, "kind": "region" }, { "startLine": 97, "startCharacter": 8, "endLine": 110, "endCharacter": 9, "kind": "region" }, { "startLine": 98, "startCharacter": 14, "endLine": 109, "endCharacter": 79, "kind": "region" }, { "startLine": 111, "startCharacter": 15, "endLine": 112, "endCharacter": 72, "kind": "region" }, { "startLine": 114, "startCharacter": 0, "endLine": 118, "endCharacter": 81, "kind": "region" }, { "startLine": 115, "startCharacter": 2, "endLine": 118, "endCharacter": 81, "kind": "region" }, { "startLine": 120, "startCharacter": 0, "endLine": 126, "endCharacter": 69, "kind": "region" }, { "startLine": 121, "startCharacter": 2, "endLine": 126, "endCharacter": 69, "kind": "region" }, { "startLine": 125, "startCharacter": 15, "endLine": 126, "endCharacter": 69, "kind": "region" }, { "startLine": 128, "startCharacter": 0, "endLine": 146, "endCharacter": 10, "kind": "region" }, { "startLine": 130, "startCharacter": 2, "endLine": 145, "endCharacter": 11, "kind": "region" }, { "startLine": 130, "startCharacter": 2, "endLine": 144, "endCharacter": 26, "kind": "region" }, { "startLine": 148, "startCharacter": 0, "endLine": 152, "endCharacter": 71, "kind": "region" }, { "startLine": 149, "startCharacter": 2, "endLine": 152, "endCharacter": 71, "kind": "region" }, { "startLine": 154, "startCharacter": 0, "endLine": 159, "endCharacter": 80, "kind": "region" }, { "startLine": 155, "startCharacter": 2, "endLine": 159, "endCharacter": 80, "kind": "region" }, { "startLine": 157, "startCharacter": 26, "endLine": 158, "endCharacter": 65, "kind": "region" }, { "startLine": 161, "startCharacter": 0, "endLine": 166, "endCharacter": 80, "kind": "region" }, { "startLine": 162, "startCharacter": 2, "endLine": 166, "endCharacter": 80, "kind": "region" }, { "startLine": 164, "startCharacter": 26, "endLine": 165, "endCharacter": 65, "kind": "region" }, { "startLine": 168, "startCharacter": 0, "endLine": 190, "endCharacter": 13, "kind": "region" }, { "startLine": 170, "startCharacter": 2, "endLine": 189, "endCharacter": 66, "kind": "region" }, { "startLine": 172, "startCharacter": 30, "endLine": 186, "endCharacter": 23, "kind": "region" }, { "startLine": 173, "startCharacter": 6, "endLine": 186, "endCharacter": 23, "kind": "region" }, { "startLine": 174, "startCharacter": 8, "endLine": 186, "endCharacter": 23, "kind": "region" }, { "startLine": 175, "startCharacter": 12, "endLine": 186, "endCharacter": 22, "kind": "region" }, { "startLine": 176, "startCharacter": 34, "endLine": 185, "endCharacter": 17, "kind": "region" }, { "startLine": 176, "startCharacter": 38, "endLine": 185, "endCharacter": 17, "kind": "region" }, { "startLine": 180, "startCharacter": 73, "endLine": 181, "endCharacter": 51, "kind": "region" }, { "startLine": 182, "startCharacter": 22, "endLine": 184, "endCharacter": 111, "kind": "region" }, { "startLine": 183, "startCharacter": 20, "endLine": 184, "endCharacter": 111, "kind": "region" }, { "startLine": 187, "startCharacter": 15, "endLine": 189, "endCharacter": 65, "kind": "region" }, { "startLine": 188, "startCharacter": 6, "endLine": 189, "endCharacter": 65, "kind": "region" }, { "startLine": 192, "startCharacter": 0, "endLine": 199, "endCharacter": 81, "kind": "region" }, { "startLine": 194, "startCharacter": 2, "endLine": 199, "endCharacter": 81, "kind": "region" }, { "startLine": 196, "startCharacter": 30, "endLine": 198, "endCharacter": 66, "kind": "region" }, { "startLine": 197, "startCharacter": 6, "endLine": 198, "endCharacter": 66, "kind": "region" }, { "startLine": 202, "startCharacter": 0, "endLine": 206, "endCharacter": 81, "kind": "region" }, { "startLine": 203, "startCharacter": 2, "endLine": 206, "endCharacter": 81, "kind": "region" }, { "startLine": 208, "startCharacter": 0, "endLine": 232, "endCharacter": 81, "kind": "region" }, { "startLine": 210, "startCharacter": 2, "endLine": 232, "endCharacter": 81, "kind": "region" }, { "startLine": 212, "startCharacter": 26, "endLine": 231, "endCharacter": 74, "kind": "region" }, { "startLine": 213, "startCharacter": 6, "endLine": 219, "endCharacter": 17, "kind": "region" }, { "startLine": 221, "startCharacter": 6, "endLine": 231, "endCharacter": 74, "kind": "region" }, { "startLine": 222, "startCharacter": 10, "endLine": 231, "endCharacter": 73, "kind": "region" }, { "startLine": 224, "startCharacter": 27, "endLine": 228, "endCharacter": 79, "kind": "region" }, { "startLine": 226, "startCharacter": 14, "endLine": 228, "endCharacter": 78, "kind": "region" }, { "startLine": 229, "startCharacter": 18, "endLine": 231, "endCharacter": 73, "kind": "region" }, { "startLine": 230, "startCharacter": 14, "endLine": 231, "endCharacter": 73, "kind": "region" }, { "startLine": 234, "startCharacter": 0, "endLine": 251, "endCharacter": 20, "kind": "region" }, { "startLine": 236, "startCharacter": 2, "endLine": 250, "endCharacter": 11, "kind": "region" }, { "startLine": 236, "startCharacter": 2, "endLine": 249, "endCharacter": 23, "kind": "region" }, { "startLine": 255, "startCharacter": 0, "endLine": 356, "endCharacter": 75, "kind": "region" }, { "startLine": 271, "startCharacter": 2, "endLine": 356, "endCharacter": 75, "kind": "region" }, { "startLine": 274, "startCharacter": 15, "endLine": 355, "endCharacter": 77, "kind": "region" }, { "startLine": 284, "startCharacter": 6, "endLine": 292, "endCharacter": 24, "kind": "region" }, { "startLine": 285, "startCharacter": 8, "endLine": 292, "endCharacter": 24, "kind": "region" }, { "startLine": 295, "startCharacter": 6, "endLine": 296, "endCharacter": 79, "kind": "region" }, { "startLine": 298, "startCharacter": 6, "endLine": 303, "endCharacter": 28, "kind": "region" }, { "startLine": 299, "startCharacter": 8, "endLine": 303, "endCharacter": 28, "kind": "region" }, { "startLine": 300, "startCharacter": 40, "endLine": 302, "endCharacter": 51, "kind": "region" }, { "startLine": 301, "startCharacter": 12, "endLine": 302, "endCharacter": 51, "kind": "region" }, { "startLine": 306, "startCharacter": 6, "endLine": 355, "endCharacter": 76, "kind": "region" }, { "startLine": 307, "startCharacter": 20, "endLine": 353, "endCharacter": 11, "kind": "region" }, { "startLine": 308, "startCharacter": 10, "endLine": 309, "endCharacter": 70, "kind": "region" }, { "startLine": 311, "startCharacter": 10, "endLine": 315, "endCharacter": 21, "kind": "region" }, { "startLine": 312, "startCharacter": 12, "endLine": 315, "endCharacter": 21, "kind": "region" }, { "startLine": 317, "startCharacter": 10, "endLine": 353, "endCharacter": 11, "kind": "region" }, { "startLine": 323, "startCharacter": 29, "endLine": 324, "endCharacter": 76, "kind": "region" }, { "startLine": 326, "startCharacter": 21, "endLine": 327, "endCharacter": 75, "kind": "region" }, { "startLine": 341, "startCharacter": 25, "endLine": 344, "endCharacter": 56, "kind": "region" }, { "startLine": 348, "startCharacter": 27, "endLine": 349, "endCharacter": 73, "kind": "region" }, { "startLine": 354, "startCharacter": 12, "endLine": 355, "endCharacter": 76, "kind": "region" }, { "startLine": 358, "startCharacter": 0, "endLine": 364, "endCharacter": 21, "kind": "region" }, { "startLine": 360, "startCharacter": 2, "endLine": 364, "endCharacter": 21, "kind": "region" }, { "startLine": 361, "startCharacter": 15, "endLine": 363, "endCharacter": 41, "kind": "region" } ] [Trace - 12:52:18 AM] Sending request 'textDocument/codeLens - (2)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" } } [Trace - 12:52:18 AM] Received response 'textDocument/codeLens - (2)' in 29ms. Result: [ { "range": { "start": { "line": 358, "character": 0 }, "end": { "line": 364, "character": 21 } }, "command": { "title": "unit -> Bsb_package_specs.t * Set_string.t", "command": "" } }, { "range": { "start": { "line": 255, "character": 0 }, "end": { "line": 356, "character": 75 } }, "command": { "title": "package_kind:Bsb_package_kind.t -> per_proj_dir:string -> Bsb_config_types.t", "command": "" } }, { "range": { "start": { "line": 234, "character": 0 }, "end": { "line": 251, "character": 20 } }, "command": { "title": "json_map -> string -> string option", "command": "" } }, { "range": { "start": { "line": 208, "character": 0 }, "end": { "line": 232, "character": 81 } }, "command": { "title": "json_map -> string -> cwd:string -> Bsb_config_types.ppx list", "command": "" } }, { "range": { "start": { "line": 202, "character": 0 }, "end": { "line": 206, "character": 81 } }, "command": { "title": "json_map -> string -> string list", "command": "" } }, { "range": { "start": { "line": 192, "character": 0 }, "end": { "line": 199, "character": 81 } }, "command": { "title": "json_map -> string -> string -> Bsb_config_types.dependencies", "command": "" } }, { "range": { "start": { "line": 168, "character": 0 }, "end": { "line": 190, "character": 13 } }, "command": { "title": "json_map -> string Map_string.t", "command": "" } }, { "range": { "start": { "line": 161, "character": 0 }, "end": { "line": 166, "character": 80 } }, "command": { "title": "json_map -> Set_string.t", "command": "" } }, { "range": { "start": { "line": 154, "character": 0 }, "end": { "line": 159, "character": 80 } }, "command": { "title": "json_map -> Set_string.t", "command": "" } }, { "range": { "start": { "line": 148, "character": 0 }, "end": { "line": 152, "character": 71 } }, "command": { "title": "json_map -> Bsb_warning.t", "command": "" } }, { "range": { "start": { "line": 128, "character": 0 }, "end": { "line": 146, "character": 10 } }, "command": { "title": "json_map -> Bsb_config_types.reason_react_jsx option", "command": "" } }, { "range": { "start": { "line": 120, "character": 0 }, "end": { "line": 126, "character": 69 } }, "command": { "title": "json_map -> string -> bool -> bool", "command": "" } }, { "range": { "start": { "line": 114, "character": 0 }, "end": { "line": 118, "character": 81 } }, "command": { "title": "json_map -> string -> (string -> 'a option) -> 'a option", "command": "" } }, { "range": { "start": { "line": 91, "character": 0 }, "end": { "line": 112, "character": 72 } }, "command": { "title": "json_map -> string -> Bsb_config_types.gentype_config option", "command": "" } }, { "range": { "start": { "line": 85, "character": 0 }, "end": { "line": 89, "character": 25 } }, "command": { "title": "json_map -> bool", "command": "" } }, { "range": { "start": { "line": 43, "character": 0 }, "end": { "line": 65, "character": 27 } }, "command": { "title": "json_map -> string * string option", "command": "" } }, { "range": { "start": { "line": 39, "character": 0 }, "end": { "line": 39, "character": 34 } }, "command": { "title": "'a Map_string.t -> string -> 'a option", "command": "" } }, { "range": { "start": { "line": 37, "character": 0 }, "end": { "line": 37, "character": 50 } }, "command": { "title": "Ext_json_types.t Map_string.t ->\nstring * Ext_json.callback -> Ext_json_types.t Map_string.t", "command": "" } }, { "range": { "start": { "line": 27, "character": 0 }, "end": { "line": 32, "character": 3 } }, "command": { "title": "string -> Bsb_pkg_types.t -> Bsb_config_types.dependency", "command": "" } }, { "range": { "start": { "line": 25, "character": 0 }, "end": { "line": 25, "character": 29 } }, "command": { "title": "string -> string -> string", "command": "" } } ] [Trace - 12:52:18 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml", "diagnostics": [] } [Trace - 12:52:18 AM] Sending request 'textDocument/documentSymbol - (3)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" } } [Trace - 12:52:18 AM] Received response 'textDocument/documentSymbol - (3)' in 5ms. Result: [ { "name": "package_specs_from_bsconfig", "detail": "unit -> Bsb_package_specs.t * Set_string.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 358, "character": 0 }, "end": { "line": 364, "character": 21 } }, "selectionRange": { "start": { "line": 358, "character": 0 }, "end": { "line": 364, "character": 21 } }, "children": [] }, { "name": "interpret_json", "detail": "package_kind:Bsb_package_kind.t -> per_proj_dir:string -> Bsb_config_types.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 255, "character": 0 }, "end": { "line": 356, "character": 75 } }, "selectionRange": { "start": { "line": 255, "character": 0 }, "end": { "line": 356, "character": 75 } }, "children": [] }, { "name": "extract_js_post_build", "detail": "json_map -> string -> string option", "kind": 12, "deprecated": false, "range": { "start": { "line": 234, "character": 0 }, "end": { "line": 251, "character": 20 } }, "selectionRange": { "start": { "line": 234, "character": 0 }, "end": { "line": 251, "character": 20 } }, "children": [] }, { "name": "extract_ppx", "detail": "json_map -> string -> cwd:string -> Bsb_config_types.ppx list", "kind": 12, "deprecated": false, "range": { "start": { "line": 208, "character": 0 }, "end": { "line": 232, "character": 81 } }, "selectionRange": { "start": { "line": 208, "character": 0 }, "end": { "line": 232, "character": 81 } }, "children": [] }, { "name": "extract_string_list", "detail": "json_map -> string -> string list", "kind": 12, "deprecated": false, "range": { "start": { "line": 202, "character": 0 }, "end": { "line": 206, "character": 81 } }, "selectionRange": { "start": { "line": 202, "character": 0 }, "end": { "line": 206, "character": 81 } }, "children": [] }, { "name": "extract_dependencies", "detail": "json_map -> string -> string -> Bsb_config_types.dependencies", "kind": 12, "deprecated": false, "range": { "start": { "line": 192, "character": 0 }, "end": { "line": 199, "character": 81 } }, "selectionRange": { "start": { "line": 192, "character": 0 }, "end": { "line": 199, "character": 81 } }, "children": [] }, { "name": "extract_generators", "detail": "json_map -> string Map_string.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 168, "character": 0 }, "end": { "line": 190, "character": 13 } }, "selectionRange": { "start": { "line": 168, "character": 0 }, "end": { "line": 190, "character": 13 } }, "children": [] }, { "name": "extract_pinned_dependencies", "detail": "json_map -> Set_string.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 161, "character": 0 }, "end": { "line": 166, "character": 80 } }, "selectionRange": { "start": { "line": 161, "character": 0 }, "end": { "line": 166, "character": 80 } }, "children": [] }, { "name": "extract_ignored_dirs", "detail": "json_map -> Set_string.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 154, "character": 0 }, "end": { "line": 159, "character": 80 } }, "selectionRange": { "start": { "line": 154, "character": 0 }, "end": { "line": 159, "character": 80 } }, "children": [] }, { "name": "extract_warning", "detail": "json_map -> Bsb_warning.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 148, "character": 0 }, "end": { "line": 152, "character": 71 } }, "selectionRange": { "start": { "line": 148, "character": 0 }, "end": { "line": 152, "character": 71 } }, "children": [] }, { "name": "extract_reason_react_jsx", "detail": "json_map -> Bsb_config_types.reason_react_jsx option", "kind": 12, "deprecated": false, "range": { "start": { "line": 128, "character": 0 }, "end": { "line": 146, "character": 10 } }, "selectionRange": { "start": { "line": 128, "character": 0 }, "end": { "line": 146, "character": 10 } }, "children": [] }, { "name": "extract_boolean", "detail": "json_map -> string -> bool -> bool", "kind": 12, "deprecated": false, "range": { "start": { "line": 120, "character": 0 }, "end": { "line": 126, "character": 69 } }, "selectionRange": { "start": { "line": 120, "character": 0 }, "end": { "line": 126, "character": 69 } }, "children": [] }, { "name": "extract_string", "detail": "json_map -> string -> (string -> 'a option) -> 'a option", "kind": 12, "deprecated": false, "range": { "start": { "line": 114, "character": 0 }, "end": { "line": 118, "character": 81 } }, "selectionRange": { "start": { "line": 114, "character": 0 }, "end": { "line": 118, "character": 81 } }, "children": [] }, { "name": "extract_gentype_config", "detail": "json_map -> string -> Bsb_config_types.gentype_config option", "kind": 12, "deprecated": false, "range": { "start": { "line": 91, "character": 0 }, "end": { "line": 112, "character": 72 } }, "selectionRange": { "start": { "line": 91, "character": 0 }, "end": { "line": 112, "character": 72 } }, "children": [] }, { "name": "check_stdlib", "detail": "json_map -> bool", "kind": 12, "deprecated": false, "range": { "start": { "line": 85, "character": 0 }, "end": { "line": 89, "character": 25 } }, "selectionRange": { "start": { "line": 85, "character": 0 }, "end": { "line": 89, "character": 25 } }, "children": [] }, { "name": "extract_package_name_and_namespace", "detail": "json_map -> string * string option", "kind": 12, "deprecated": false, "range": { "start": { "line": 43, "character": 0 }, "end": { "line": 65, "character": 27 } }, "selectionRange": { "start": { "line": 43, "character": 0 }, "end": { "line": 65, "character": 27 } }, "children": [] }, { "name": ".?()", "detail": "'a Map_string.t -> string -> 'a option", "kind": 12, "deprecated": false, "range": { "start": { "line": 39, "character": 0 }, "end": { "line": 39, "character": 34 } }, "selectionRange": { "start": { "line": 39, "character": 0 }, "end": { "line": 39, "character": 34 } }, "children": [] }, { "name": "|?", "detail": "Ext_json_types.t Map_string.t ->\nstring * Ext_json.callback -> Ext_json_types.t Map_string.t", "kind": 12, "deprecated": false, "range": { "start": { "line": 37, "character": 0 }, "end": { "line": 37, "character": 50 } }, "selectionRange": { "start": { "line": 37, "character": 0 }, "end": { "line": 37, "character": 50 } }, "children": [] }, { "name": "json_map", "kind": 15, "deprecated": false, "range": { "start": { "line": 34, "character": 0 }, "end": { "line": 34, "character": 45 } }, "selectionRange": { "start": { "line": 34, "character": 0 }, "end": { "line": 34, "character": 45 } }, "children": [] }, { "name": "resolve_package", "detail": "string -> Bsb_pkg_types.t -> Bsb_config_types.dependency", "kind": 12, "deprecated": false, "range": { "start": { "line": 27, "character": 0 }, "end": { "line": 32, "character": 3 } }, "selectionRange": { "start": { "line": 27, "character": 0 }, "end": { "line": 32, "character": 3 } }, "children": [] }, { "name": "//", "detail": "string -> string -> string", "kind": 12, "deprecated": false, "range": { "start": { "line": 25, "character": 0 }, "end": { "line": 25, "character": 29 } }, "selectionRange": { "start": { "line": 25, "character": 0 }, "end": { "line": 25, "character": 29 } }, "children": [] } ] [Trace - 12:53:24 AM] Sending request 'textDocument/codeLens - (4)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" } } [Trace - 12:53:24 AM] Received response 'textDocument/codeLens - (4)' in 15ms. Result: [ { "range": { "start": { "line": 358, "character": 0 }, "end": { "line": 364, "character": 21 } }, "command": { "title": "unit -> Bsb_package_specs.t * Set_string.t", "command": "" } }, { "range": { "start": { "line": 255, "character": 0 }, "end": { "line": 356, "character": 75 } }, "command": { "title": "package_kind:Bsb_package_kind.t -> per_proj_dir:string -> Bsb_config_types.t", "command": "" } }, { "range": { "start": { "line": 234, "character": 0 }, "end": { "line": 251, "character": 20 } }, "command": { "title": "json_map -> string -> string option", "command": "" } }, { "range": { "start": { "line": 208, "character": 0 }, "end": { "line": 232, "character": 81 } }, "command": { "title": "json_map -> string -> cwd:string -> Bsb_config_types.ppx list", "command": "" } }, { "range": { "start": { "line": 202, "character": 0 }, "end": { "line": 206, "character": 81 } }, "command": { "title": "json_map -> string -> string list", "command": "" } }, { "range": { "start": { "line": 192, "character": 0 }, "end": { "line": 199, "character": 81 } }, "command": { "title": "json_map -> string -> string -> Bsb_config_types.dependencies", "command": "" } }, { "range": { "start": { "line": 168, "character": 0 }, "end": { "line": 190, "character": 13 } }, "command": { "title": "json_map -> string Map_string.t", "command": "" } }, { "range": { "start": { "line": 161, "character": 0 }, "end": { "line": 166, "character": 80 } }, "command": { "title": "json_map -> Set_string.t", "command": "" } }, { "range": { "start": { "line": 154, "character": 0 }, "end": { "line": 159, "character": 80 } }, "command": { "title": "json_map -> Set_string.t", "command": "" } }, { "range": { "start": { "line": 148, "character": 0 }, "end": { "line": 152, "character": 71 } }, "command": { "title": "json_map -> Bsb_warning.t", "command": "" } }, { "range": { "start": { "line": 128, "character": 0 }, "end": { "line": 146, "character": 10 } }, "command": { "title": "json_map -> Bsb_config_types.reason_react_jsx option", "command": "" } }, { "range": { "start": { "line": 120, "character": 0 }, "end": { "line": 126, "character": 69 } }, "command": { "title": "json_map -> string -> bool -> bool", "command": "" } }, { "range": { "start": { "line": 114, "character": 0 }, "end": { "line": 118, "character": 81 } }, "command": { "title": "json_map -> string -> (string -> 'a option) -> 'a option", "command": "" } }, { "range": { "start": { "line": 91, "character": 0 }, "end": { "line": 112, "character": 72 } }, "command": { "title": "json_map -> string -> Bsb_config_types.gentype_config option", "command": "" } }, { "range": { "start": { "line": 85, "character": 0 }, "end": { "line": 89, "character": 25 } }, "command": { "title": "json_map -> bool", "command": "" } }, { "range": { "start": { "line": 43, "character": 0 }, "end": { "line": 65, "character": 27 } }, "command": { "title": "json_map -> string * string option", "command": "" } }, { "range": { "start": { "line": 39, "character": 0 }, "end": { "line": 39, "character": 34 } }, "command": { "title": "'a Map_string.t -> string -> 'a option", "command": "" } }, { "range": { "start": { "line": 37, "character": 0 }, "end": { "line": 37, "character": 50 } }, "command": { "title": "Ext_json_types.t Map_string.t ->\nstring * Ext_json.callback -> Ext_json_types.t Map_string.t", "command": "" } }, { "range": { "start": { "line": 27, "character": 0 }, "end": { "line": 32, "character": 3 } }, "command": { "title": "string -> Bsb_pkg_types.t -> Bsb_config_types.dependency", "command": "" } }, { "range": { "start": { "line": 25, "character": 0 }, "end": { "line": 25, "character": 29 } }, "command": { "title": "string -> string -> string", "command": "" } } ] [Trace - 12:53:24 AM] Sending request 'textDocument/definition - (5)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 17 } } [Trace - 12:53:24 AM] Received response 'textDocument/definition - (5)' in 3ms. Result: [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml", "range": { "start": { "line": 27, "character": 4 }, "end": { "line": 27, "character": 4 } } } ] [Trace - 12:53:25 AM] Sending request 'textDocument/hover - (6)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 17 } } [Trace - 12:53:25 AM] Received response 'textDocument/hover - (6)' in 5ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nstring -> Bsb_pkg_types.t -> Bsb_config_types.dependency\n```" }, "range": { "start": { "line": 198, "character": 10 }, "end": { "line": 198, "character": 25 } } } [Trace - 12:53:25 AM] Sending request 'textDocument/hover - (7)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 16 } } [Trace - 12:53:25 AM] Received response 'textDocument/hover - (7)' in 2ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependencies\n```" }, "range": { "start": { "line": 194, "character": 2 }, "end": { "line": 199, "character": 81 } } } [Trace - 12:53:27 AM] Sending request 'textDocument/hover - (8)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 197, "character": 4 } } [Trace - 12:53:27 AM] Received response 'textDocument/hover - (8)' in 5ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependencies\n```" }, "range": { "start": { "line": 197, "character": 6 }, "end": { "line": 198, "character": 66 } } } [Trace - 12:53:28 AM] Sending request 'textDocument/hover - (9)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 1 } } [Trace - 12:53:28 AM] Received response 'textDocument/hover - (9)' in 4ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependency\n```" }, "range": { "start": { "line": 198, "character": 10 }, "end": { "line": 198, "character": 65 } } } [Trace - 12:53:28 AM] Sending request 'textDocument/hover - (10)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 0 } } [Trace - 12:53:28 AM] Received response 'textDocument/hover - (10)' in 2ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependency\n```" }, "range": { "start": { "line": 198, "character": 10 }, "end": { "line": 198, "character": 65 } } } [Trace - 12:53:29 AM] Sending request 'textDocument/definition - (11)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 7 } } [Trace - 12:53:29 AM] Received response 'textDocument/definition - (11)' in 1ms. No result returned. [Trace - 12:53:29 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "Locate failed. not in environment: return" } [Error - 12:53:29 AM] Locate failed. not in environment: return [Trace - 12:53:29 AM] Sending request 'textDocument/definition - (12)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 10 } } [Trace - 12:53:29 AM] Received response 'textDocument/definition - (12)' in 1ms. No result returned. [Trace - 12:53:29 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "Locate failed. not in environment: an" } [Error - 12:53:29 AM] Locate failed. not in environment: an [Trace - 12:53:29 AM] Sending request 'textDocument/definition - (13)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 23 } } [Trace - 12:53:29 AM] Received response 'textDocument/definition - (13)' in 1ms. No result returned. [Trace - 12:53:29 AM] Sending request 'textDocument/definition - (14)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 25 } } [Trace - 12:53:29 AM] Received response 'textDocument/definition - (14)' in 1ms. No result returned. [Trace - 12:53:29 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "Locate failed. not in environment: if" } [Error - 12:53:29 AM] Locate failed. not in environment: if [Trace - 12:53:30 AM] Sending request 'textDocument/definition - (15)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 28 } } [Trace - 12:53:30 AM] Received response 'textDocument/definition - (15)' in 6ms. Result: [ { "uri": "file:///Users/cristianocalcagno/.opam/4.14.0/lib/ocaml/stdlib.ml", "range": { "start": { "line": 81, "character": 0 }, "end": { "line": 81, "character": 0 } } } ] [Trace - 12:53:30 AM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/.opam/4.14.0/lib/ocaml/stdlib.ml", "languageId": "ocaml", "version": 1, "text": "(**************************************************************************)\n(* *)\n(* OCaml *)\n(* *)\n(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)\n(* *)\n(* Copyright 1996 Institut National de Recherche en Informatique et *)\n(* en Automatique. *)\n(* *)\n(* All rights reserved. This file is distributed under the terms of *)\n(* the GNU Lesser General Public License version 2.1, with the *)\n(* special exception on linking described in the file LICENSE. *)\n(* *)\n(**************************************************************************)\n\n(* Exceptions *)\n\nexternal register_named_value : string -> 'a -> unit\n = \"caml_register_named_value\"\n\nlet () =\n (* for runtime/fail_nat.c *)\n register_named_value \"Pervasives.array_bound_error\"\n (Invalid_argument \"index out of bounds\")\n\nexternal raise : exn -> 'a = \"%raise\"\nexternal raise_notrace : exn -> 'a = \"%raise_notrace\"\n\nlet failwith s = raise(Failure s)\nlet invalid_arg s = raise(Invalid_argument s)\n\nexception Exit\nexception Match_failure = Match_failure\nexception Assert_failure = Assert_failure\nexception Invalid_argument = Invalid_argument\nexception Failure = Failure\nexception Not_found = Not_found\nexception Out_of_memory = Out_of_memory\nexception Stack_overflow = Stack_overflow\nexception Sys_error = Sys_error\nexception End_of_file = End_of_file\nexception Division_by_zero = Division_by_zero\nexception Sys_blocked_io = Sys_blocked_io\nexception Undefined_recursive_module = Undefined_recursive_module\n\n(* Composition operators *)\n\nexternal ( |> ) : 'a -> ('a -> 'b) -> 'b = \"%revapply\"\nexternal ( @@ ) : ('a -> 'b) -> 'a -> 'b = \"%apply\"\n\n(* Debugging *)\n\nexternal __LOC__ : string = \"%loc_LOC\"\nexternal __FILE__ : string = \"%loc_FILE\"\nexternal __LINE__ : int = \"%loc_LINE\"\nexternal __MODULE__ : string = \"%loc_MODULE\"\nexternal __POS__ : string * int * int * int = \"%loc_POS\"\nexternal __FUNCTION__ : string = \"%loc_FUNCTION\"\n\nexternal __LOC_OF__ : 'a -> string * 'a = \"%loc_LOC\"\nexternal __LINE_OF__ : 'a -> int * 'a = \"%loc_LINE\"\nexternal __POS_OF__ : 'a -> (string * int * int * int) * 'a = \"%loc_POS\"\n\n(* Comparisons *)\n\nexternal ( = ) : 'a -> 'a -> bool = \"%equal\"\nexternal ( <> ) : 'a -> 'a -> bool = \"%notequal\"\nexternal ( < ) : 'a -> 'a -> bool = \"%lessthan\"\nexternal ( > ) : 'a -> 'a -> bool = \"%greaterthan\"\nexternal ( <= ) : 'a -> 'a -> bool = \"%lessequal\"\nexternal ( >= ) : 'a -> 'a -> bool = \"%greaterequal\"\nexternal compare : 'a -> 'a -> int = \"%compare\"\n\nlet min x y = if x <= y then x else y\nlet max x y = if x >= y then x else y\n\nexternal ( == ) : 'a -> 'a -> bool = \"%eq\"\nexternal ( != ) : 'a -> 'a -> bool = \"%noteq\"\n\n(* Boolean operations *)\n\nexternal not : bool -> bool = \"%boolnot\"\nexternal ( & ) : bool -> bool -> bool = \"%sequand\"\nexternal ( && ) : bool -> bool -> bool = \"%sequand\"\nexternal ( or ) : bool -> bool -> bool = \"%sequor\"\nexternal ( || ) : bool -> bool -> bool = \"%sequor\"\n\n(* Integer operations *)\n\nexternal ( ~- ) : int -> int = \"%negint\"\nexternal ( ~+ ) : int -> int = \"%identity\"\nexternal succ : int -> int = \"%succint\"\nexternal pred : int -> int = \"%predint\"\nexternal ( + ) : int -> int -> int = \"%addint\"\nexternal ( - ) : int -> int -> int = \"%subint\"\nexternal ( * ) : int -> int -> int = \"%mulint\"\nexternal ( / ) : int -> int -> int = \"%divint\"\nexternal ( mod ) : int -> int -> int = \"%modint\"\n\nlet abs x = if x >= 0 then x else -x\n\nexternal ( land ) : int -> int -> int = \"%andint\"\nexternal ( lor ) : int -> int -> int = \"%orint\"\nexternal ( lxor ) : int -> int -> int = \"%xorint\"\n\nlet lnot x = x lxor (-1)\n\nexternal ( lsl ) : int -> int -> int = \"%lslint\"\nexternal ( lsr ) : int -> int -> int = \"%lsrint\"\nexternal ( asr ) : int -> int -> int = \"%asrint\"\n\nlet max_int = (-1) lsr 1\nlet min_int = max_int + 1\n\n(* Floating-point operations *)\n\nexternal ( ~-. ) : float -> float = \"%negfloat\"\nexternal ( ~+. ) : float -> float = \"%identity\"\nexternal ( +. ) : float -> float -> float = \"%addfloat\"\nexternal ( -. ) : float -> float -> float = \"%subfloat\"\nexternal ( *. ) : float -> float -> float = \"%mulfloat\"\nexternal ( /. ) : float -> float -> float = \"%divfloat\"\nexternal ( ** ) : float -> float -> float = \"caml_power_float\" \"pow\"\n [@@unboxed] [@@noalloc]\nexternal exp : float -> float = \"caml_exp_float\" \"exp\" [@@unboxed] [@@noalloc]\nexternal expm1 : float -> float = \"caml_expm1_float\" \"caml_expm1\"\n [@@unboxed] [@@noalloc]\nexternal acos : float -> float = \"caml_acos_float\" \"acos\"\n [@@unboxed] [@@noalloc]\nexternal asin : float -> float = \"caml_asin_float\" \"asin\"\n [@@unboxed] [@@noalloc]\nexternal atan : float -> float = \"caml_atan_float\" \"atan\"\n [@@unboxed] [@@noalloc]\nexternal atan2 : float -> float -> float = \"caml_atan2_float\" \"atan2\"\n [@@unboxed] [@@noalloc]\nexternal hypot : float -> float -> float\n = \"caml_hypot_float\" \"caml_hypot\" [@@unboxed] [@@noalloc]\nexternal cos : float -> float = \"caml_cos_float\" \"cos\" [@@unboxed] [@@noalloc]\nexternal cosh : float -> float = \"caml_cosh_float\" \"cosh\"\n [@@unboxed] [@@noalloc]\nexternal acosh : float -> float = \"caml_acosh_float\" \"caml_acosh\"\n [@@unboxed] [@@noalloc]\nexternal log : float -> float = \"caml_log_float\" \"log\" [@@unboxed] [@@noalloc]\nexternal log10 : float -> float = \"caml_log10_float\" \"log10\"\n [@@unboxed] [@@noalloc]\nexternal log1p : float -> float = \"caml_log1p_float\" \"caml_log1p\"\n [@@unboxed] [@@noalloc]\nexternal sin : float -> float = \"caml_sin_float\" \"sin\" [@@unboxed] [@@noalloc]\nexternal sinh : float -> float = \"caml_sinh_float\" \"sinh\"\n [@@unboxed] [@@noalloc]\nexternal asinh : float -> float = \"caml_asinh_float\" \"caml_asinh\"\n [@@unboxed] [@@noalloc]\nexternal sqrt : float -> float = \"caml_sqrt_float\" \"sqrt\"\n [@@unboxed] [@@noalloc]\nexternal tan : float -> float = \"caml_tan_float\" \"tan\" [@@unboxed] [@@noalloc]\nexternal tanh : float -> float = \"caml_tanh_float\" \"tanh\"\n [@@unboxed] [@@noalloc]\nexternal atanh : float -> float = \"caml_atanh_float\" \"caml_atanh\"\n [@@unboxed] [@@noalloc]\nexternal ceil : float -> float = \"caml_ceil_float\" \"ceil\"\n [@@unboxed] [@@noalloc]\nexternal floor : float -> float = \"caml_floor_float\" \"floor\"\n [@@unboxed] [@@noalloc]\nexternal abs_float : float -> float = \"%absfloat\"\nexternal copysign : float -> float -> float\n = \"caml_copysign_float\" \"caml_copysign\"\n [@@unboxed] [@@noalloc]\nexternal mod_float : float -> float -> float = \"caml_fmod_float\" \"fmod\"\n [@@unboxed] [@@noalloc]\nexternal frexp : float -> float * int = \"caml_frexp_float\"\nexternal ldexp : (float [@unboxed]) -> (int [@untagged]) -> (float [@unboxed]) =\n \"caml_ldexp_float\" \"caml_ldexp_float_unboxed\" [@@noalloc]\nexternal modf : float -> float * float = \"caml_modf_float\"\nexternal float : int -> float = \"%floatofint\"\nexternal float_of_int : int -> float = \"%floatofint\"\nexternal truncate : float -> int = \"%intoffloat\"\nexternal int_of_float : float -> int = \"%intoffloat\"\nexternal float_of_bits : int64 -> float\n = \"caml_int64_float_of_bits\" \"caml_int64_float_of_bits_unboxed\"\n [@@unboxed] [@@noalloc]\nlet infinity =\n float_of_bits 0x7F_F0_00_00_00_00_00_00L\nlet neg_infinity =\n float_of_bits 0xFF_F0_00_00_00_00_00_00L\nlet nan =\n float_of_bits 0x7F_F0_00_00_00_00_00_01L\nlet max_float =\n float_of_bits 0x7F_EF_FF_FF_FF_FF_FF_FFL\nlet min_float =\n float_of_bits 0x00_10_00_00_00_00_00_00L\nlet epsilon_float =\n float_of_bits 0x3C_B0_00_00_00_00_00_00L\n\ntype fpclass =\n FP_normal\n | FP_subnormal\n | FP_zero\n | FP_infinite\n | FP_nan\nexternal classify_float : (float [@unboxed]) -> fpclass =\n \"caml_classify_float\" \"caml_classify_float_unboxed\" [@@noalloc]\n\n(* String and byte sequence operations -- more in modules String and Bytes *)\n\nexternal string_length : string -> int = \"%string_length\"\nexternal bytes_length : bytes -> int = \"%bytes_length\"\nexternal bytes_create : int -> bytes = \"caml_create_bytes\"\nexternal string_blit : string -> int -> bytes -> int -> int -> unit\n = \"caml_blit_string\" [@@noalloc]\nexternal bytes_blit : bytes -> int -> bytes -> int -> int -> unit\n = \"caml_blit_bytes\" [@@noalloc]\nexternal bytes_unsafe_to_string : bytes -> string = \"%bytes_to_string\"\n\nlet ( ^ ) s1 s2 =\n let l1 = string_length s1 and l2 = string_length s2 in\n let s = bytes_create (l1 + l2) in\n string_blit s1 0 s 0 l1;\n string_blit s2 0 s l1 l2;\n bytes_unsafe_to_string s\n\n(* Character operations -- more in module Char *)\n\nexternal int_of_char : char -> int = \"%identity\"\nexternal unsafe_char_of_int : int -> char = \"%identity\"\nlet char_of_int n =\n if n < 0 || n > 255 then invalid_arg \"char_of_int\" else unsafe_char_of_int n\n\n(* Unit operations *)\n\nexternal ignore : 'a -> unit = \"%ignore\"\n\n(* Pair operations *)\n\nexternal fst : 'a * 'b -> 'a = \"%field0\"\nexternal snd : 'a * 'b -> 'b = \"%field1\"\n\n(* References *)\n\ntype 'a ref = { mutable contents : 'a }\nexternal ref : 'a -> 'a ref = \"%makemutable\"\nexternal ( ! ) : 'a ref -> 'a = \"%field0\"\nexternal ( := ) : 'a ref -> 'a -> unit = \"%setfield0\"\nexternal incr : int ref -> unit = \"%incr\"\nexternal decr : int ref -> unit = \"%decr\"\n\n(* Result type *)\n\ntype ('a,'b) result = Ok of 'a | Error of 'b\n\n(* String conversion functions *)\n\nexternal format_int : string -> int -> string = \"caml_format_int\"\nexternal format_float : string -> float -> string = \"caml_format_float\"\n\nlet string_of_bool b =\n if b then \"true\" else \"false\"\nlet bool_of_string = function\n | \"true\" -> true\n | \"false\" -> false\n | _ -> invalid_arg \"bool_of_string\"\n\nlet bool_of_string_opt = function\n | \"true\" -> Some true\n | \"false\" -> Some false\n | _ -> None\n\nlet string_of_int n =\n format_int \"%d\" n\n\nexternal int_of_string : string -> int = \"caml_int_of_string\"\n\nlet int_of_string_opt s =\n (* TODO: provide this directly as a non-raising primitive. *)\n try Some (int_of_string s)\n with Failure _ -> None\n\nexternal string_get : string -> int -> char = \"%string_safe_get\"\n\nlet valid_float_lexem s =\n let l = string_length s in\n let rec loop i =\n if i >= l then s ^ \".\" else\n match string_get s i with\n | '0' .. '9' | '-' -> loop (i + 1)\n | _ -> s\n in\n loop 0\n\nlet string_of_float f = valid_float_lexem (format_float \"%.12g\" f)\n\nexternal float_of_string : string -> float = \"caml_float_of_string\"\n\nlet float_of_string_opt s =\n (* TODO: provide this directly as a non-raising primitive. *)\n try Some (float_of_string s)\n with Failure _ -> None\n\n(* List operations -- more in module List *)\n\nlet rec ( @ ) l1 l2 =\n match l1 with\n [] -> l2\n | hd :: tl -> hd :: (tl @ l2)\n\n(* I/O operations *)\n\ntype in_channel\ntype out_channel\n\nexternal open_descriptor_out : int -> out_channel\n = \"caml_ml_open_descriptor_out\"\nexternal open_descriptor_in : int -> in_channel = \"caml_ml_open_descriptor_in\"\n\nlet stdin = open_descriptor_in 0\nlet stdout = open_descriptor_out 1\nlet stderr = open_descriptor_out 2\n\n(* General output functions *)\n\ntype open_flag =\n Open_rdonly | Open_wronly | Open_append\n | Open_creat | Open_trunc | Open_excl\n | Open_binary | Open_text | Open_nonblock\n\nexternal open_desc : string -> open_flag list -> int -> int = \"caml_sys_open\"\n\nexternal set_out_channel_name: out_channel -> string -> unit =\n \"caml_ml_set_channel_name\"\n\nlet open_out_gen mode perm name =\n let c = open_descriptor_out(open_desc name mode perm) in\n set_out_channel_name c name;\n c\n\nlet open_out name =\n open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_text] 0o666 name\n\nlet open_out_bin name =\n open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_binary] 0o666 name\n\nexternal flush : out_channel -> unit = \"caml_ml_flush\"\n\nexternal out_channels_list : unit -> out_channel list\n = \"caml_ml_out_channels_list\"\n\nlet flush_all () =\n let rec iter = function\n [] -> ()\n | a::l ->\n begin try\n flush a\n with Sys_error _ ->\n () (* ignore channels closed during a preceding flush. *)\n end;\n iter l\n in iter (out_channels_list ())\n\nexternal unsafe_output : out_channel -> bytes -> int -> int -> unit\n = \"caml_ml_output_bytes\"\nexternal unsafe_output_string : out_channel -> string -> int -> int -> unit\n = \"caml_ml_output\"\n\nexternal output_char : out_channel -> char -> unit = \"caml_ml_output_char\"\n\nlet output_bytes oc s =\n unsafe_output oc s 0 (bytes_length s)\n\nlet output_string oc s =\n unsafe_output_string oc s 0 (string_length s)\n\nlet output oc s ofs len =\n if ofs < 0 || len < 0 || ofs > bytes_length s - len\n then invalid_arg \"output\"\n else unsafe_output oc s ofs len\n\nlet output_substring oc s ofs len =\n if ofs < 0 || len < 0 || ofs > string_length s - len\n then invalid_arg \"output_substring\"\n else unsafe_output_string oc s ofs len\n\nexternal output_byte : out_channel -> int -> unit = \"caml_ml_output_char\"\nexternal output_binary_int : out_channel -> int -> unit = \"caml_ml_output_int\"\n\nexternal marshal_to_channel : out_channel -> 'a -> unit list -> unit\n = \"caml_output_value\"\nlet output_value chan v = marshal_to_channel chan v []\n\nexternal seek_out : out_channel -> int -> unit = \"caml_ml_seek_out\"\nexternal pos_out : out_channel -> int = \"caml_ml_pos_out\"\nexternal out_channel_length : out_channel -> int = \"caml_ml_channel_size\"\nexternal close_out_channel : out_channel -> unit = \"caml_ml_close_channel\"\nlet close_out oc = flush oc; close_out_channel oc\nlet close_out_noerr oc =\n (try flush oc with _ -> ());\n (try close_out_channel oc with _ -> ())\nexternal set_binary_mode_out : out_channel -> bool -> unit\n = \"caml_ml_set_binary_mode\"\n\n(* General input functions *)\n\nexternal set_in_channel_name: in_channel -> string -> unit =\n \"caml_ml_set_channel_name\"\n\nlet open_in_gen mode perm name =\n let c = open_descriptor_in(open_desc name mode perm) in\n set_in_channel_name c name;\n c\n\nlet open_in name =\n open_in_gen [Open_rdonly; Open_text] 0 name\n\nlet open_in_bin name =\n open_in_gen [Open_rdonly; Open_binary] 0 name\n\nexternal input_char : in_channel -> char = \"caml_ml_input_char\"\n\nexternal unsafe_input : in_channel -> bytes -> int -> int -> int\n = \"caml_ml_input\"\n\nlet input ic s ofs len =\n if ofs < 0 || len < 0 || ofs > bytes_length s - len\n then invalid_arg \"input\"\n else unsafe_input ic s ofs len\n\nlet rec unsafe_really_input ic s ofs len =\n if len <= 0 then () else begin\n let r = unsafe_input ic s ofs len in\n if r = 0\n then raise End_of_file\n else unsafe_really_input ic s (ofs + r) (len - r)\n end\n\nlet really_input ic s ofs len =\n if ofs < 0 || len < 0 || ofs > bytes_length s - len\n then invalid_arg \"really_input\"\n else unsafe_really_input ic s ofs len\n\nlet really_input_string ic len =\n let s = bytes_create len in\n really_input ic s 0 len;\n bytes_unsafe_to_string s\n\nexternal input_scan_line : in_channel -> int = \"caml_ml_input_scan_line\"\n\nlet input_line chan =\n let rec build_result buf pos = function\n [] -> buf\n | hd :: tl ->\n let len = bytes_length hd in\n bytes_blit hd 0 buf (pos - len) len;\n build_result buf (pos - len) tl in\n let rec scan accu len =\n let n = input_scan_line chan in\n if n = 0 then begin (* n = 0: we are at EOF *)\n match accu with\n [] -> raise End_of_file\n | _ -> build_result (bytes_create len) len accu\n end else if n > 0 then begin (* n > 0: newline found in buffer *)\n let res = bytes_create (n - 1) in\n ignore (unsafe_input chan res 0 (n - 1));\n ignore (input_char chan); (* skip the newline *)\n match accu with\n [] -> res\n | _ -> let len = len + n - 1 in\n build_result (bytes_create len) len (res :: accu)\n end else begin (* n < 0: newline not found *)\n let beg = bytes_create (-n) in\n ignore(unsafe_input chan beg 0 (-n));\n scan (beg :: accu) (len - n)\n end\n in bytes_unsafe_to_string (scan [] 0)\n\nexternal input_byte : in_channel -> int = \"caml_ml_input_char\"\nexternal input_binary_int : in_channel -> int = \"caml_ml_input_int\"\nexternal input_value : in_channel -> 'a = \"caml_input_value\"\nexternal seek_in : in_channel -> int -> unit = \"caml_ml_seek_in\"\nexternal pos_in : in_channel -> int = \"caml_ml_pos_in\"\nexternal in_channel_length : in_channel -> int = \"caml_ml_channel_size\"\nexternal close_in : in_channel -> unit = \"caml_ml_close_channel\"\nlet close_in_noerr ic = (try close_in ic with _ -> ())\nexternal set_binary_mode_in : in_channel -> bool -> unit\n = \"caml_ml_set_binary_mode\"\n\n(* Output functions on standard output *)\n\nlet print_char c = output_char stdout c\nlet print_string s = output_string stdout s\nlet print_bytes s = output_bytes stdout s\nlet print_int i = output_string stdout (string_of_int i)\nlet print_float f = output_string stdout (string_of_float f)\nlet print_endline s =\n output_string stdout s; output_char stdout '\\n'; flush stdout\nlet print_newline () = output_char stdout '\\n'; flush stdout\n\n(* Output functions on standard error *)\n\nlet prerr_char c = output_char stderr c\nlet prerr_string s = output_string stderr s\nlet prerr_bytes s = output_bytes stderr s\nlet prerr_int i = output_string stderr (string_of_int i)\nlet prerr_float f = output_string stderr (string_of_float f)\nlet prerr_endline s =\n output_string stderr s; output_char stderr '\\n'; flush stderr\nlet prerr_newline () = output_char stderr '\\n'; flush stderr\n\n(* Input functions on standard input *)\n\nlet read_line () = flush stdout; input_line stdin\nlet read_int () = int_of_string(read_line())\nlet read_int_opt () = int_of_string_opt(read_line())\nlet read_float () = float_of_string(read_line())\nlet read_float_opt () = float_of_string_opt(read_line())\n\n(* Operations on large files *)\n\nmodule LargeFile =\n struct\n external seek_out : out_channel -> int64 -> unit = \"caml_ml_seek_out_64\"\n external pos_out : out_channel -> int64 = \"caml_ml_pos_out_64\"\n external out_channel_length : out_channel -> int64\n = \"caml_ml_channel_size_64\"\n external seek_in : in_channel -> int64 -> unit = \"caml_ml_seek_in_64\"\n external pos_in : in_channel -> int64 = \"caml_ml_pos_in_64\"\n external in_channel_length : in_channel -> int64 = \"caml_ml_channel_size_64\"\n end\n\n(* Formats *)\n\ntype ('a, 'b, 'c, 'd, 'e, 'f) format6\n = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6\n = Format of ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt\n * string\n\ntype ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6\n\ntype ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4\n\nlet string_of_format (Format (_fmt, str)) = str\n\nexternal format_of_string :\n ('a, 'b, 'c, 'd, 'e, 'f) format6 ->\n ('a, 'b, 'c, 'd, 'e, 'f) format6 = \"%identity\"\n\nlet ( ^^ ) (Format (fmt1, str1)) (Format (fmt2, str2)) =\n Format (CamlinternalFormatBasics.concat_fmt fmt1 fmt2,\n str1 ^ \"%,\" ^ str2)\n\n(* Miscellaneous *)\n\nexternal sys_exit : int -> 'a = \"caml_sys_exit\"\n\nlet exit_function = CamlinternalAtomic.make flush_all\n\nlet rec at_exit f =\n let module Atomic = CamlinternalAtomic in\n (* MPR#7253, MPR#7796: make sure \"f\" is executed only once *)\n let f_yet_to_run = Atomic.make true in\n let old_exit = Atomic.get exit_function in\n let new_exit () =\n if Atomic.compare_and_set f_yet_to_run true false then f () ;\n old_exit ()\n in\n let success = Atomic.compare_and_set exit_function old_exit new_exit in\n if not success then at_exit f\n\nlet do_at_exit () = (CamlinternalAtomic.get exit_function) ()\n\nlet exit retcode =\n do_at_exit ();\n sys_exit retcode\n\nlet _ = register_named_value \"Pervasives.do_at_exit\" do_at_exit\n\nexternal major : unit -> unit = \"caml_gc_major\"\nexternal naked_pointers_checked : unit -> bool\n = \"caml_sys_const_naked_pointers_checked\"\nlet () = if naked_pointers_checked () then at_exit major\n\n(*MODULE_ALIASES*)\nmodule Arg = Arg\nmodule Array = Array\nmodule ArrayLabels = ArrayLabels\nmodule Atomic = Atomic\nmodule Bigarray = Bigarray\nmodule Bool = Bool\nmodule Buffer = Buffer\nmodule Bytes = Bytes\nmodule BytesLabels = BytesLabels\nmodule Callback = Callback\nmodule Char = Char\nmodule Complex = Complex\nmodule Digest = Digest\nmodule Either = Either\nmodule Ephemeron = Ephemeron\nmodule Filename = Filename\nmodule Float = Float\nmodule Format = Format\nmodule Fun = Fun\nmodule Gc = Gc\nmodule Genlex = Genlex\nmodule Hashtbl = Hashtbl\nmodule In_channel = In_channel\nmodule Int = Int\nmodule Int32 = Int32\nmodule Int64 = Int64\nmodule Lazy = Lazy\nmodule Lexing = Lexing\nmodule List = List\nmodule ListLabels = ListLabels\nmodule Map = Map\nmodule Marshal = Marshal\nmodule MoreLabels = MoreLabels\nmodule Nativeint = Nativeint\nmodule Obj = Obj\nmodule Oo = Oo\nmodule Option = Option\nmodule Out_channel = Out_channel\nmodule Parsing = Parsing\nmodule Pervasives = Pervasives\nmodule Printexc = Printexc\nmodule Printf = Printf\nmodule Queue = Queue\nmodule Random = Random\nmodule Result = Result\nmodule Scanf = Scanf\nmodule Seq = Seq\nmodule Set = Set\nmodule Stack = Stack\nmodule StdLabels = StdLabels\nmodule Stream = Stream\nmodule String = String\nmodule StringLabels = StringLabels\nmodule Sys = Sys\nmodule Uchar = Uchar\nmodule Unit = Unit\nmodule Weak = Weak\n" } } [Trace - 12:53:30 AM] Sending notification 'textDocument/didClose'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/.opam/4.14.0/lib/ocaml/stdlib.ml" } } [Trace - 12:53:30 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/.opam/4.14.0/lib/ocaml/stdlib.ml", "diagnostics": [] } [Trace - 12:53:30 AM] Sending request 'textDocument/definition - (16)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 201, "character": 32 } } [Trace - 12:53:30 AM] Received response 'textDocument/definition - (16)' in 1ms. No result returned. [Trace - 12:53:30 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "Locate failed. not in environment: found" } [Error - 12:53:30 AM] Locate failed. not in environment: found [Trace - 12:53:30 AM] Sending request 'textDocument/definition - (17)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 38 } } [Trace - 12:53:30 AM] Received response 'textDocument/definition - (17)' in 12ms. Result: [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "range": { "start": { "line": 93, "character": 4 }, "end": { "line": 93, "character": 4 } } } ] [Trace - 12:53:30 AM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "languageId": "ocaml", "version": 1, "text": "(* Copyright (C) 2015-2016 Bloomberg Finance L.P.\n * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * In addition to the permissions granted to you by the LGPL, you may combine\n * or link a \"work that uses the Library\" with a publicly distributed version\n * of this file to produce a combined library or application, then distribute\n * that combined work under the terms of your choosing, with no requirement\n * to comply with the obligations normally placed on you by section 4 of the\n * LGPL version 3 (or the corresponding section of a later version of the LGPL\n * should you choose to use a later version).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)\n\ntype error =\n | Package_not_found of Bsb_pkg_types.t * string option (* json file *)\n | Json_config of Ext_position.t * string\n | Invalid_json of string\n | Invalid_spec of string\n | Conflict_module of string * string * string\n | No_implementation of string\n | Not_consistent of string\n\nexception Error of error\n\nlet error err = raise (Error err)\n\nlet package_not_found ~pkg ~json = error (Package_not_found (pkg, json))\n\nlet print (fmt : Format.formatter) (x : error) =\n match x with\n | Conflict_module (modname, dir1, dir2) ->\n Format.fprintf fmt\n \"@{Error:@} %s found in two directories: (%s, %s)\\n\\\n File names must be unique per project\" modname dir1 dir2\n | Not_consistent modname ->\n Format.fprintf fmt\n \"@{Error:@} %s has implementation/interface in non-consistent \\\n syntax(reason/ocaml)\"\n modname\n | No_implementation modname ->\n Format.fprintf fmt\n \"@{Error:@} %s does not have implementation file\" modname\n | Package_not_found (name, json_opt) ->\n let in_json =\n match json_opt with None -> Ext_string.empty | Some x -> \" in \" ^ x\n in\n let name = Bsb_pkg_types.to_string name in\n if Ext_string.equal name !Bs_version.package_name then\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} is not found %s\\n\\\n It's the basic, required package. If you have it installed globally,\\n\\\n Please run `npm link rescript` to make it available\" name in_json\n else\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} not found or built %s\\n\\\n - Did you install it?\\n\\\n - If you did, did you run `rescript build -with-deps`?\" name in_json\n | Json_config (pos, s) ->\n Format.fprintf fmt\n \"File %S, line %d:\\n\\\n @{Error:@} %s \\n\\\n For more details, please checkout the schema \\\n https://rescript-lang.org/docs/manual/latest/build-configuration-schema\"\n pos.pos_fname pos.pos_lnum s\n | Invalid_spec s ->\n Format.fprintf fmt \"@{Error: Invalid bsconfig.json %s@}\" s\n | Invalid_json s ->\n Format.fprintf fmt\n \"File %S, line 1\\n@{Error: Invalid json format@}\" s\n\nlet conflict_module modname dir1 dir2 =\n Error (Conflict_module (modname, dir1, dir2))\n\nlet no_implementation modname = error (No_implementation modname)\n\nlet not_consistent modname = error (Not_consistent modname)\n\nlet errorf ~loc fmt =\n Format.ksprintf (fun s -> error (Json_config (loc, s))) fmt\n\nlet config_error config fmt =\n let loc = Ext_json.loc_of config in\n\n error (Json_config (loc, fmt))\n\nlet invalid_spec s = error (Invalid_spec s)\n\nlet invalid_json s = error (Invalid_json s)\n\nlet () =\n Printexc.register_printer (fun x ->\n match x with Error x -> Some (Format.asprintf \"%a\" print x) | _ -> None)\n" } } [Trace - 12:53:30 AM] Sending notification 'textDocument/didClose'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml" } } [Trace - 12:53:30 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "diagnostics": [] } [Trace - 12:53:30 AM] Sending request 'textDocument/hover - (18)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 38 } } [Trace - 12:53:30 AM] Received response 'textDocument/hover - (18)' in 3ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nExt_json_types.t -> string -> 'a\n```" }, "range": { "start": { "line": 199, "character": 19 }, "end": { "line": 199, "character": 45 } } } [Trace - 12:54:00 AM] Sending request 'textDocument/hover - (19)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 17 } } [Trace - 12:54:00 AM] Received response 'textDocument/hover - (19)' in 3ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependencies\n```" }, "range": { "start": { "line": 194, "character": 2 }, "end": { "line": 199, "character": 81 } } } [Trace - 12:54:00 AM] Sending request 'textDocument/definition - (20)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 17 } } [Trace - 12:54:00 AM] Received response 'textDocument/definition - (20)' in 2ms. Result: [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml", "range": { "start": { "line": 27, "character": 4 }, "end": { "line": 27, "character": 4 } } } ] [Trace - 12:54:00 AM] Sending request 'textDocument/hover - (21)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 17 } } [Trace - 12:54:00 AM] Received response 'textDocument/hover - (21)' in 2ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nstring -> Bsb_pkg_types.t -> Bsb_config_types.dependency\n```" }, "range": { "start": { "line": 198, "character": 10 }, "end": { "line": 198, "character": 25 } } } [Trace - 12:54:00 AM] Sending request 'textDocument/hover - (22)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 16 } } [Trace - 12:54:00 AM] Received response 'textDocument/hover - (22)' in 4ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependencies\n```" }, "range": { "start": { "line": 194, "character": 2 }, "end": { "line": 199, "character": 81 } } } [Trace - 12:54:04 AM] Sending request 'textDocument/definition - (23)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 36 } } [Trace - 12:54:04 AM] Received response 'textDocument/definition - (23)' in 2ms. Result: [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "range": { "start": { "line": 93, "character": 4 }, "end": { "line": 93, "character": 4 } } } ] [Trace - 12:54:04 AM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "languageId": "ocaml", "version": 1, "text": "(* Copyright (C) 2015-2016 Bloomberg Finance L.P.\n * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * In addition to the permissions granted to you by the LGPL, you may combine\n * or link a \"work that uses the Library\" with a publicly distributed version\n * of this file to produce a combined library or application, then distribute\n * that combined work under the terms of your choosing, with no requirement\n * to comply with the obligations normally placed on you by section 4 of the\n * LGPL version 3 (or the corresponding section of a later version of the LGPL\n * should you choose to use a later version).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)\n\ntype error =\n | Package_not_found of Bsb_pkg_types.t * string option (* json file *)\n | Json_config of Ext_position.t * string\n | Invalid_json of string\n | Invalid_spec of string\n | Conflict_module of string * string * string\n | No_implementation of string\n | Not_consistent of string\n\nexception Error of error\n\nlet error err = raise (Error err)\n\nlet package_not_found ~pkg ~json = error (Package_not_found (pkg, json))\n\nlet print (fmt : Format.formatter) (x : error) =\n match x with\n | Conflict_module (modname, dir1, dir2) ->\n Format.fprintf fmt\n \"@{Error:@} %s found in two directories: (%s, %s)\\n\\\n File names must be unique per project\" modname dir1 dir2\n | Not_consistent modname ->\n Format.fprintf fmt\n \"@{Error:@} %s has implementation/interface in non-consistent \\\n syntax(reason/ocaml)\"\n modname\n | No_implementation modname ->\n Format.fprintf fmt\n \"@{Error:@} %s does not have implementation file\" modname\n | Package_not_found (name, json_opt) ->\n let in_json =\n match json_opt with None -> Ext_string.empty | Some x -> \" in \" ^ x\n in\n let name = Bsb_pkg_types.to_string name in\n if Ext_string.equal name !Bs_version.package_name then\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} is not found %s\\n\\\n It's the basic, required package. If you have it installed globally,\\n\\\n Please run `npm link rescript` to make it available\" name in_json\n else\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} not found or built %s\\n\\\n - Did you install it?\\n\\\n - If you did, did you run `rescript build -with-deps`?\" name in_json\n | Json_config (pos, s) ->\n Format.fprintf fmt\n \"File %S, line %d:\\n\\\n @{Error:@} %s \\n\\\n For more details, please checkout the schema \\\n https://rescript-lang.org/docs/manual/latest/build-configuration-schema\"\n pos.pos_fname pos.pos_lnum s\n | Invalid_spec s ->\n Format.fprintf fmt \"@{Error: Invalid bsconfig.json %s@}\" s\n | Invalid_json s ->\n Format.fprintf fmt\n \"File %S, line 1\\n@{Error: Invalid json format@}\" s\n\nlet conflict_module modname dir1 dir2 =\n Error (Conflict_module (modname, dir1, dir2))\n\nlet no_implementation modname = error (No_implementation modname)\n\nlet not_consistent modname = error (Not_consistent modname)\n\nlet errorf ~loc fmt =\n Format.ksprintf (fun s -> error (Json_config (loc, s))) fmt\n\nlet config_error config fmt =\n let loc = Ext_json.loc_of config in\n\n error (Json_config (loc, fmt))\n\nlet invalid_spec s = error (Invalid_spec s)\n\nlet invalid_json s = error (Invalid_json s)\n\nlet () =\n Printexc.register_printer (fun x ->\n match x with Error x -> Some (Format.asprintf \"%a\" print x) | _ -> None)\n" } } [Trace - 12:54:04 AM] Sending notification 'textDocument/didClose'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml" } } [Trace - 12:54:04 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "diagnostics": [] } [Trace - 12:54:04 AM] Sending request 'textDocument/hover - (24)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 39 } } [Trace - 12:54:04 AM] Received response 'textDocument/hover - (24)' in 3ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nExt_json_types.t -> string -> 'a\n```" }, "range": { "start": { "line": 199, "character": 19 }, "end": { "line": 199, "character": 45 } } } [Trace - 12:54:04 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "diagnostics": [] } [Trace - 12:54:05 AM] Sending request 'textDocument/definition - (25)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 32 } } [Trace - 12:54:05 AM] Received response 'textDocument/definition - (25)' in 3ms. Result: [ { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "range": { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 } } } ] [Trace - 12:54:05 AM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "languageId": "ocaml", "version": 1, "text": "(* Copyright (C) 2015-2016 Bloomberg Finance L.P.\n * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * In addition to the permissions granted to you by the LGPL, you may combine\n * or link a \"work that uses the Library\" with a publicly distributed version\n * of this file to produce a combined library or application, then distribute\n * that combined work under the terms of your choosing, with no requirement\n * to comply with the obligations normally placed on you by section 4 of the\n * LGPL version 3 (or the corresponding section of a later version of the LGPL\n * should you choose to use a later version).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)\n\ntype error =\n | Package_not_found of Bsb_pkg_types.t * string option (* json file *)\n | Json_config of Ext_position.t * string\n | Invalid_json of string\n | Invalid_spec of string\n | Conflict_module of string * string * string\n | No_implementation of string\n | Not_consistent of string\n\nexception Error of error\n\nlet error err = raise (Error err)\n\nlet package_not_found ~pkg ~json = error (Package_not_found (pkg, json))\n\nlet print (fmt : Format.formatter) (x : error) =\n match x with\n | Conflict_module (modname, dir1, dir2) ->\n Format.fprintf fmt\n \"@{Error:@} %s found in two directories: (%s, %s)\\n\\\n File names must be unique per project\" modname dir1 dir2\n | Not_consistent modname ->\n Format.fprintf fmt\n \"@{Error:@} %s has implementation/interface in non-consistent \\\n syntax(reason/ocaml)\"\n modname\n | No_implementation modname ->\n Format.fprintf fmt\n \"@{Error:@} %s does not have implementation file\" modname\n | Package_not_found (name, json_opt) ->\n let in_json =\n match json_opt with None -> Ext_string.empty | Some x -> \" in \" ^ x\n in\n let name = Bsb_pkg_types.to_string name in\n if Ext_string.equal name !Bs_version.package_name then\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} is not found %s\\n\\\n It's the basic, required package. If you have it installed globally,\\n\\\n Please run `npm link rescript` to make it available\" name in_json\n else\n Format.fprintf fmt\n \"File \\\"bsconfig.json\\\", line 1\\n\\\n @{Error:@} package @{%s@} not found or built %s\\n\\\n - Did you install it?\\n\\\n - If you did, did you run `rescript build -with-deps`?\" name in_json\n | Json_config (pos, s) ->\n Format.fprintf fmt\n \"File %S, line %d:\\n\\\n @{Error:@} %s \\n\\\n For more details, please checkout the schema \\\n https://rescript-lang.org/docs/manual/latest/build-configuration-schema\"\n pos.pos_fname pos.pos_lnum s\n | Invalid_spec s ->\n Format.fprintf fmt \"@{Error: Invalid bsconfig.json %s@}\" s\n | Invalid_json s ->\n Format.fprintf fmt\n \"File %S, line 1\\n@{Error: Invalid json format@}\" s\n\nlet conflict_module modname dir1 dir2 =\n Error (Conflict_module (modname, dir1, dir2))\n\nlet no_implementation modname = error (No_implementation modname)\n\nlet not_consistent modname = error (Not_consistent modname)\n\nlet errorf ~loc fmt =\n Format.ksprintf (fun s -> error (Json_config (loc, s))) fmt\n\nlet config_error config fmt =\n let loc = Ext_json.loc_of config in\n\n error (Json_config (loc, fmt))\n\nlet invalid_spec s = error (Invalid_spec s)\n\nlet invalid_json s = error (Invalid_json s)\n\nlet () =\n Printexc.register_printer (fun x ->\n match x with Error x -> Some (Format.asprintf \"%a\" print x) | _ -> None)\n" } } [Trace - 12:54:05 AM] Sending notification 'textDocument/didClose'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml" } } [Trace - 12:54:05 AM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_exception.ml", "diagnostics": [] } [Trace - 12:54:05 AM] Sending request 'textDocument/definition - (26)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 15 } } [Trace - 12:54:05 AM] Received response 'textDocument/definition - (26)' in 2ms. No result returned. [Trace - 12:54:06 AM] Sending request 'textDocument/hover - (27)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 15 } } [Trace - 12:54:06 AM] Received response 'textDocument/hover - (27)' in 2ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nExt_json_types.t\n```" }, "range": { "start": { "line": 199, "character": 9 }, "end": { "line": 199, "character": 15 } } } [Trace - 12:54:06 AM] Sending request 'textDocument/definition - (28)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 15 } } [Trace - 12:54:06 AM] Received response 'textDocument/definition - (28)' in 1ms. No result returned. [Trace - 12:54:06 AM] Received notification 'window/logMessage'. Params: { "type": 1, "message": "Locate failed. resolve_package not found." } [Error - 12:54:06 AM] Locate failed. resolve_package not found. [Trace - 12:54:06 AM] Sending request 'textDocument/hover - (29)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 198, "character": 16 } } [Trace - 12:54:06 AM] Received response 'textDocument/hover - (29)' in 2ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nstring -> Bsb_pkg_types.t -> Bsb_config_types.dependency\n```" }, "range": { "start": { "line": 198, "character": 10 }, "end": { "line": 198, "character": 25 } } } [Trace - 12:54:07 AM] Sending request 'textDocument/hover - (30)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 199, "character": 16 } } [Trace - 12:54:07 AM] Received response 'textDocument/hover - (30)' in 15ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\nBsb_config_types.dependencies\n```" }, "range": { "start": { "line": 194, "character": 2 }, "end": { "line": 199, "character": 81 } } } [Trace - 12:55:06 AM] Sending request 'textDocument/hover - (31)'. Params: { "textDocument": { "uri": "file:///Users/cristianocalcagno/GitHub/rescript-compiler/jscomp/bsb/bsb_config_parse.ml" }, "position": { "line": 206, "character": 8 } } [Trace - 12:55:06 AM] Received response 'textDocument/hover - (31)' in 3ms. Result: { "contents": { "kind": "markdown", "value": "```ocaml\n'a -> 'a option\n```\n---\nSome" }, "range": { "start": { "line": 206, "character": 4 }, "end": { "line": 206, "character": 8 } } }