Skip to content

Commit

Permalink
Merge pull request #17451 from igfoo/igfoo/dbscheme
Browse files Browse the repository at this point in the history
Java: Remove deprecated elements from dbscheme
  • Loading branch information
igfoo authored Sep 17, 2024
2 parents d680a54 + 9a398aa commit c7e3682
Show file tree
Hide file tree
Showing 14 changed files with 5,159 additions and 830 deletions.
1,233 changes: 1,233 additions & 0 deletions java/downgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/old.dbscheme

Large diffs are not rendered by default.

1,265 changes: 1,265 additions & 0 deletions java/downgrades/376ce7dad79375c0772b8edb938da82ca5271ba1/semmlecode.dbscheme

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class TypeVariable extends @typevariable {
string toString() { none() }
}

class ClassOrInterfaceOrCallable extends @classorinterfaceorcallable {
string toString() { none() }
}

from TypeVariable id, string nodeName, int pos, ClassOrInterfaceOrCallable parentid
where typeVars(id, nodeName, pos, parentid)
select id, nodeName, pos, 0, parentid
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: Remove deprecated entries
compatibility: partial
typeVars.rel: run typeVars.qlo
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ open class KotlinFileExtractor(
// parameter S of
// `class Generic<T> { public <S> Generic(T t, S s) { ... } }` will have `tp.index` 1,
// not 0).
tw.writeTypeVars(id, tp.name.asString(), apparentIndex, 0, parentId)
tw.writeTypeVars(id, tp.name.asString(), apparentIndex, parentId)
val locId = tw.getLocation(tp)
tw.writeHasLocation(id, locId)

Expand Down
62 changes: 15 additions & 47 deletions java/ql/lib/config/semmlecode.dbscheme
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,6 @@ compilation_time(
float seconds : float ref
);

/**
* An error or warning generated by the extractor.
* The diagnostic message `diagnostic` was generated during compiler
* invocation `compilation`, and is the `file_number_diagnostic_number`th
* message generated while extracting the `file_number`th file of that
* invocation.
*/
#keyset[compilation, file_number, file_number_diagnostic_number]
diagnostic_for(
unique int diagnostic : @diagnostic ref,
int compilation : @compilation ref,
int file_number : int ref,
int file_number_diagnostic_number : int ref
);

/**
* The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed
* time (respectively) that the original compilation (not the extraction)
Expand Down Expand Up @@ -191,6 +176,21 @@ diagnostics(
int location: @location_default ref
);

/**
* An error or warning generated by the extractor.
* The diagnostic message `diagnostic` was generated during compiler
* invocation `compilation`, and is the `file_number_diagnostic_number`th
* message generated while extracting the `file_number`th file of that
* invocation.
*/
#keyset[compilation, file_number, file_number_diagnostic_number]
diagnostic_for(
unique int diagnostic : @diagnostic ref,
int compilation : @compilation ref,
int file_number : int ref,
int file_number_diagnostic_number : int ref
);

/*
* External artifacts
*/
Expand All @@ -202,41 +202,10 @@ externalData(
string value : string ref
);

snapshotDate(
unique date snapshotDate : date ref
);

sourceLocationPrefix(
string prefix : string ref
);

/*
* Duplicate code
*/

duplicateCode(
unique int id : @duplication,
string relativePath : string ref,
int equivClass : int ref
);

similarCode(
unique int id : @similarity,
string relativePath : string ref,
int equivClass : int ref
);

@duplication_or_similarity = @duplication | @similarity

tokens(
int id : @duplication_or_similarity ref,
int offset : int ref,
int beginLine : int ref,
int beginColumn : int ref,
int endLine : int ref,
int endColumn : int ref
);

/*
* SMAP
*/
Expand Down Expand Up @@ -516,7 +485,6 @@ typeVars(
unique int id: @typevariable,
string nodeName: string ref,
int pos: int ref,
int kind: int ref, // deprecated
int parentid: @classorinterfaceorcallable ref
);

Expand Down
Loading

0 comments on commit c7e3682

Please sign in to comment.