microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
272 stars 77 forks source link

Version 1.13 breaks extensions that use vscode-debugadapter #65

Closed ramya-rao-a closed 8 years ago

ramya-rao-a commented 8 years ago

https://travis-ci.org/Microsoft/vscode-go/jobs/162066430 is a travis build failure for the Go extension that uses vscode-debugadapter with the below setting in package.json "vscode-debugadapter": "^1.11.0"

I can reproduce this locally by clearing the node_nodules folder and running npm install followed by node ./node_modules/vscode/bin/compile The error is: node_modules/vscode-debugadapter/lib/protocol.d.ts(1,1): error TS1084: Invalid 'reference' directive syntax.

No error if the ^ in the package.json is dropped "vscode-debugadapter": "1.11.0"

Travis builds ran just fine yesterday, so this should be due to the latest upgrade to 1.13 which uses Typescript 2.0 which could have breaking changes.

Including @mousetraps who helped to narrow this down

weinand commented 8 years ago

@ramya-rao-a yes, the debug protocol libraries for node have been updated for TypeScript 2.0.2 and the '@types' feature.

The 1.6 release notes mention this and provide a workaround if someone is not ready for the TypeScript upgrade:

Debug Protocol server library upgraded to TypeScript 2.0.2

The server library vscode-debugadapter for the VS Code debug protocol has been upgraded to TypeScript 2.0.2 and its new '@Types' feature.

If you are not ready to upgrade your debug extension to TypeScript 2.x you can continue to use the previous version of the library by setting your dependencies in the package.json to the 1.12 version:

  "dependencies": {
    "vscode-debugprotocol": "1.12.*",
    "vscode-debugadapter": "1.12.*"
    ...
  },
  "devDependencies": {
    "vscode-debugadapter-testsupport": "1.12.*",
    ...
  },
kieferrm commented 8 years ago

@weinand according to https://docs.npmjs.com/getting-started/semantic-versioning shouldn't we increment the major version of the npm package as this is a breaking change?

mousetraps commented 8 years ago

Agreed re semver. Also did a quick search to understand the impact and almost everyone depending on vscode-debugadapter is using carets and was thereby silently broken by this change. https://github.com/search?l=json&q=vscode-debugadapter&ref=simplesearch&type=Code&utf8=%E2%9C%93

Sent from my Rotary Phone

    _____________________________

From: Kai Maetzel notifications@github.com Sent: Friday, September 23, 2016 7:17 AM Subject: Re: [Microsoft/vscode-debugadapter-node] Version 1.13 breaks extensions that use vscode-debugadapter (#65) To: Microsoft/vscode-debugadapter-node vscode-debugadapter-node@noreply.github.com Cc: Mention mention@noreply.github.com, Sara Itani itani@outlook.com

@weinand according to https://docs.npmjs.com/getting-started/semantic-versioning shouldn't we increment the major version of the npm package as this is a breaking change?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

weinand commented 8 years ago

I don't want to increment the major version because there is no semantic change in the protocol and everything is 'binary' compatible. The only issue is that TS 2.0 produces some /// <reference types="node" /> at the beginning of the d.ts files which TS 1.8 cannot handle. Removing this fixes the issue.

weinand commented 8 years ago

I've removed the /// <reference types="node" /> from the vscode-debugadapter and the vscode-testsupport modules and published them as v1.13.1 on npm.

@ramya-rao-a please try to rebuild vscode-go.

ramya-rao-a commented 8 years ago

@weinand That works. Thanks!