0

I have a language server plugin that I inherited from a developer no longer in our company. It is published in vscode marketplace. It works kinda ok, as has issues but at least does something.

Now when I've fetched the repo & made the fixes needed and published the newer version marketplace it refuses to do anything. Just stays gray and has that "reload" button next to it.

What I've done to it:

  • made a few small tweaks to server.ts
  • changed publisher name (he had it on his own publisher name & we dont have credentials for it)
  • bumped version number

It works just fine on debug mode, and publishing it does not give any errors or warnings. I also get the "extension has been reviewed" email from microsoft. I've also uninstalled the previous plugin.

I've also tried the following with zero help:

  • completely fresh install on a new system
  • change the language extension to something else than what it is in the old plugin

What is strange that now I cannot event get the original version of the plugin to work. I.e. when I pull the old one from github, change publisher info and publish it, I get the same results. No errors - everything works fine in debug mode - vscode marketplace accepts it - but nothing works.

I also cannot find any way to get ANY debug info out of the plugin & tips there would be greatly appreciated too.

Here's package.json from root w names changed. Original is 1:1 the same except for version and publisher name. Version numbers etc have been changed under server/ and client/ too.

{
    "name": "my-plugin",
    "description": "foo",
    "author": "bar",
    "license": "MIT",
    "version": "1.2.3",
    "publisher": "bar",
    "engines": {
        "vscode": "^1.16.0"

    },
    "contributes": {
        "languages": [
            {
                "id": "baz",
                "aliases": [
                    "baz"
                ],
                "extensions": [
                    ".baz"
                ]
            }
        ],
        "grammars": [
            {
                "language": "baz",
                "scopeName": "source.baz",
                "path": "./client/syntaxes/baz.tmLanguage"
            }
        ]
    },
    "activationEvents": [
        "onLanguage:baz"
    ],
    "repository": {
        "type": "git",
        "url": "https://github.com/bar/quux"
    },
    "scripts": {
        "postinstall": "cd server && npm install && cd ../client && npm install && cd ..",
        "compile": "tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json",
        "compile:client": "tsc -p client/tsconfig.json",
        "watch:client": "tsc -w -p client/tsconfig.json",
        "compile:server": "cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json",
        "watch:server": "cd server && npm run installServer && cd .. && tsc -w -p server/tsconfig.json"
    },
    "devDependencies": {
        "@types/mocha": "^2.2.48",
        "@types/node": "^6.0.103",
        "@types/request": "^2.47.0",
        "typescript": "^2.7.2"
    }
} 

Update: there is no sign on disk that vscode is actually installing anything on disk.

Update #2: it does actually install it on disk, just did not find it myself. The file structure does not match the previous extension:

Here's how the old version looks when installed:

-rw-rw-r--  1 jp jp  857 Oct 18 22:08 CHANGELOG.md
-rw-r--r--  1 jp jp  791 Oct 18 22:08 language-configuration.json
drwxrwxr-x 15 jp jp 4.0K Oct 18 22:08 node_modules/
drwxrwxr-x  3 jp jp 4.0K Oct 18 22:08 out/
-rw-r--r--  1 jp jp 1.8K Oct 18 22:08 package.json
-rw-r--r--  1 jp jp  79K Oct 18 22:08 package-lock.json
-rw-rw-r--  1 jp jp  496 Oct 18 22:08 README.md
drwxrwxr-x  3 jp jp 4.0K Oct 18 22:08 server/
drwxrwxr-x  2 jp jp 4.0K Oct 18 22:08 syntaxes/

Here's how the new one looks:

-rw-rw-r-- 1 jp jp  229 Oct 18 22:06 CHANGELOG.md
drwxrwxr-x 7 jp jp 4.0K Oct 18 22:06 client/
-rw-rw-r-- 1 jp jp 1.1K Oct 18 22:06 License.txt
-rw-rw-r-- 1 jp jp 1.5K Oct 18 22:06 package.json
-rw-rw-r-- 1 jp jp 2.6K Oct 18 22:06 package-lock.json
-rw-rw-r-- 1 jp jp 1.2K Oct 18 22:06 README.md
drwxrwxr-x 4 jp jp 4.0K Oct 18 22:06 server/
-rw-rw-r-- 1 jp jp 1.9K Oct 18 22:06 ThirdPartyNotices.txt

Update #3

It looks like the new version has a client/ folder that matches root of the old one. I tried running vsce publish under myplugin/client but that did nothing

Update #4

I copied the new extensions client folder as it's root and now it works...

So now the mystery becomes why it packs and publishes it wrong.

Gama11
  • 31,714
  • 9
  • 78
  • 100
Seppo420
  • 2,041
  • 2
  • 18
  • 37
  • also, there is nothing in vscode devtools – Seppo420 Oct 18 '18 at 18:30
  • Have you changed `.vscodeignore`, which plays an important role during publishing. `vsce` simply zips up all things in your working directory, and exclude what inside `.vscodeignore`, so if anything is missing from your final extension package, it would be either missing from your working directory, or was mistakenly excluded. – Lex Li Oct 18 '18 at 22:30

0 Answers0