llvm / vscode-mlir

Other
51 stars 13 forks source link

[question] ./out/extension.js not found #5

Closed Freed-Wu closed 8 months ago

Freed-Wu commented 10 months ago

I try to transplant this extension to coc.nvim:

diff --git a/package.json b/package.json
index bd550e2..30a0f2e 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "vscode-mlir",
+  "name": "coc-mlir",
   "displayName": "MLIR",
   "description": "MLIR Language Extension",
   "version": "0.0.11",
@@ -7,12 +7,13 @@
   "homepage": "https://mlir.llvm.org/",
   "icon": "icon.png",
   "engines": {
-    "vscode": "^1.67.0"
+    "coc": ">= 0.0.71"
   },
   "categories": [
     "Programming Languages"
   ],
   "keywords": [
+    "coc.nvim",
     "LLVM",
     "MLIR",
     "PDLL",
@@ -32,14 +33,12 @@
     "vscode:prepublish": "tsc -p ./",
     "compile": "tsc -watch -p ./",
     "format": "clang-format -i --glob=\"{src,test}/*.ts\"",
-    "package": "vsce package",
-    "publish": "vsce publish",
     "git-clang-format": "git-clang-format"
   },
   "dependencies": {
     "base64-js": "^1.5.1",
     "chokidar": "3.5.2",
-    "vscode-languageclient": "^8.0.2-next.5"
+    "coc.nvim": ">= 0.0.71"
   },
   "devDependencies": {
     "@types/mocha": "^7.0.2",

However, I get

- ✗ coc-mlir main file ./out/extension.js not found, you may need to build the project.

How to get ./out/extension.js?

Freed-Wu commented 10 months ago

Currently, it can work for me, just use language servers (Except mlir-pdll-lsp-server), however I still want a coc extension :smile:

screen-2023-12-25-21-59-46

For mlir-pdll-lsp-server, I met.

$ mlir-pdll-lsp-server
: CommandLine Error: Option 'debug-counter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)

Related issue

Freed-Wu commented 8 months ago

I have found the reason. vscode use .vscodeignore, however coc.nvim use .npmignore.

https://github.com/Freed-Wu/coc-mlir