Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to read 0.5.0 dumps #187

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions language-service/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
4 changes: 2 additions & 2 deletions language-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion language-service/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@vscode/lsif-language-service",
"description": "LSIF based language services",
"version": "0.1.0-pre.1",
"version": "0.1.0-pre.2",
"author": "Microsoft Corporation",
"license": "MIT",
"repository": {
Expand All @@ -14,6 +14,8 @@
"engines": {
"node": ">=20.9.0"
},
"main": "./lib/api.js",
"typings": "./lib/api.d.ts",
"exports": {
".": {
"types": "./lib/api.d.ts",
Expand Down
12 changes: 9 additions & 3 deletions language-service/src/jsonStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Id, Vertex, Project, Document, Range, DiagnosticResult, DocumentSymbolResult, FoldingRangeResult, DocumentLinkResult, DefinitionResult,
TypeDefinitionResult, HoverResult, ReferenceResult, ImplementationResult, Edge, RangeBasedDocumentSymbol, DeclarationResult,
ElementTypes, VertexLabels, EdgeLabels, ItemEdgeProperties, EventScope, EventKind, ProjectEvent, Moniker as PMoniker, MonikerKind,
types
types, type MetaData
} from '@vscode/lsif-protocol';

import { DocumentInfo } from './files';
Expand Down Expand Up @@ -165,10 +165,10 @@ export class JsonStore extends Database {
reject(new Error(`No valid semantic version string. The version is: ${this.version}`));
return;
}
const range: SemVer.Range = new SemVer.Range('>0.5.99 <=0.6.0-next.7');
const range: SemVer.Range = new SemVer.Range('>=0.5.0 <=0.6.0-next.7');
range.includePrerelease = true;
if (!SemVer.satisfies(semVer, range)) {
reject(new Error(`Requires version range >0.5.99 <=0.6.0-next.7 but received: ${this.version}`));
reject(new Error(`Requires version range >=0.5.0 <=0.6.0-next.7 but received: ${this.version}`));
return;
}
}
Expand All @@ -187,10 +187,16 @@ export class JsonStore extends Database {
}

private processVertex(vertex: Vertex): void {
interface LegacyMetaData extends MetaData {
projectRoot?: string;
}
this.vertices.all.set(vertex.id, vertex);
switch(vertex.label) {
case VertexLabels.metaData:
this.version = vertex.version;
if (this.workspaceRoot === undefined && (vertex as LegacyMetaData).projectRoot !== undefined) {
this.workspaceRoot = URI.parse((vertex as LegacyMetaData).projectRoot!);
}
break;
case VertexLabels.source:
this.workspaceRoot = URI.parse(vertex.workspaceRoot);
Expand Down