Skip to content

Commit c7e3682

Browse files
authored
Merge pull request #17451 from igfoo/igfoo/dbscheme
Java: Remove deprecated elements from dbscheme
2 parents d680a54 + 9a398aa commit c7e3682

File tree

14 files changed

+5159
-830
lines changed

14 files changed

+5159
-830
lines changed

java/downgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme

Lines changed: 1233 additions & 0 deletions
Large diffs are not rendered by default.

java/downgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme

Lines changed: 1265 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class TypeVariable extends @typevariable {
2+
string toString() { none() }
3+
}
4+
5+
class ClassOrInterfaceOrCallable extends @classorinterfaceorcallable {
6+
string toString() { none() }
7+
}
8+
9+
from TypeVariable id, string nodeName, int pos, ClassOrInterfaceOrCallable parentid
10+
where typeVars(id, nodeName, pos, parentid)
11+
select id, nodeName, pos, 0, parentid
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
description: Remove deprecated entries
2+
compatibility: partial
3+
typeVars.rel: run typeVars.qlo

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ open class KotlinFileExtractor(
325325
// parameter S of
326326
// `class Generic<T> { public <S> Generic(T t, S s) { ... } }` will have `tp.index` 1,
327327
// not 0).
328-
tw.writeTypeVars(id, tp.name.asString(), apparentIndex, 0, parentId)
328+
tw.writeTypeVars(id, tp.name.asString(), apparentIndex, parentId)
329329
val locId = tw.getLocation(tp)
330330
tw.writeHasLocation(id, locId)
331331

java/ql/lib/config/semmlecode.dbscheme

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -138,21 +138,6 @@ compilation_time(
138138
float seconds : float ref
139139
);
140140

141-
/**
142-
* An error or warning generated by the extractor.
143-
* The diagnostic message `diagnostic` was generated during compiler
144-
* invocation `compilation`, and is the `file_number_diagnostic_number`th
145-
* message generated while extracting the `file_number`th file of that
146-
* invocation.
147-
*/
148-
#keyset[compilation, file_number, file_number_diagnostic_number]
149-
diagnostic_for(
150-
unique int diagnostic : @diagnostic ref,
151-
int compilation : @compilation ref,
152-
int file_number : int ref,
153-
int file_number_diagnostic_number : int ref
154-
);
155-
156141
/**
157142
* The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed
158143
* time (respectively) that the original compilation (not the extraction)
@@ -191,6 +176,21 @@ diagnostics(
191176
int location: @location_default ref
192177
);
193178

179+
/**
180+
* An error or warning generated by the extractor.
181+
* The diagnostic message `diagnostic` was generated during compiler
182+
* invocation `compilation`, and is the `file_number_diagnostic_number`th
183+
* message generated while extracting the `file_number`th file of that
184+
* invocation.
185+
*/
186+
#keyset[compilation, file_number, file_number_diagnostic_number]
187+
diagnostic_for(
188+
unique int diagnostic : @diagnostic ref,
189+
int compilation : @compilation ref,
190+
int file_number : int ref,
191+
int file_number_diagnostic_number : int ref
192+
);
193+
194194
/*
195195
* External artifacts
196196
*/
@@ -202,41 +202,10 @@ externalData(
202202
string value : string ref
203203
);
204204

205-
snapshotDate(
206-
unique date snapshotDate : date ref
207-
);
208-
209205
sourceLocationPrefix(
210206
string prefix : string ref
211207
);
212208

213-
/*
214-
* Duplicate code
215-
*/
216-
217-
duplicateCode(
218-
unique int id : @duplication,
219-
string relativePath : string ref,
220-
int equivClass : int ref
221-
);
222-
223-
similarCode(
224-
unique int id : @similarity,
225-
string relativePath : string ref,
226-
int equivClass : int ref
227-
);
228-
229-
@duplication_or_similarity = @duplication | @similarity
230-
231-
tokens(
232-
int id : @duplication_or_similarity ref,
233-
int offset : int ref,
234-
int beginLine : int ref,
235-
int beginColumn : int ref,
236-
int endLine : int ref,
237-
int endColumn : int ref
238-
);
239-
240209
/*
241210
* SMAP
242211
*/
@@ -516,7 +485,6 @@ typeVars(
516485
unique int id: @typevariable,
517486
string nodeName: string ref,
518487
int pos: int ref,
519-
int kind: int ref, // deprecated
520488
int parentid: @classorinterfaceorcallable ref
521489
);
522490

0 commit comments

Comments
 (0)