Skip to content

Commit beb27bf

Browse files
author
Paolo Tranquilli
committed
Rust: fix QL compilation and schema includes ordering
1 parent b4b6807 commit beb27bf

File tree

7 files changed

+5
-117
lines changed

7 files changed

+5
-117
lines changed

misc/codegen/lib/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def check_types(self, known: typing.Iterable[str]):
118118
@dataclass
119119
class Schema:
120120
classes: Dict[str, Class] = field(default_factory=dict)
121-
includes: Set[str] = field(default_factory=set)
121+
includes: List[str] = field(default_factory=list)
122122
null: Optional[str] = None
123123

124124
@property

misc/codegen/loaders/schemaloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def load(m: types.ModuleType) -> schema.Schema:
135135
if hasattr(defs, name):
136136
continue
137137
if name == "__includes":
138-
includes = set(data)
138+
includes = data
139139
continue
140140
if name.startswith("__"):
141141
continue

rust/ql/lib/codeql/IDEContextual.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Provides shared predicates related to contextual queries in the code viewer.
33
*/
44

5-
private import codeql.rust.elements.File
5+
import codeql.files.FileSystem
66
private import codeql.util.FileSystem
77

88
/**

rust/ql/lib/codeql/rust/controlflow/internal/PrintCfg.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @tags ide-contextual-queries/print-cfg
88
*/
99

10-
private import codeql.rust.elements.File
10+
private import codeql.files.FileSystem
1111
private import codeql.rust.controlflow.internal.ControlFlowGraphImpl
1212
private import codeql.rust.controlflow.ControlFlowGraph
1313

rust/ql/lib/codeql/rust/elements/File.qll

Lines changed: 0 additions & 111 deletions
This file was deleted.

rust/ql/lib/codeql/rust/elements/Locatable.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44

55
private import codeql.rust.generated.Locatable
6-
import codeql.files.FileSystem
76
import codeql.Locations
87
private import codeql.rust.generated.Synth
98
private import codeql.rust.generated.Raw

rust/ql/lib/codeql/rust/printast/PrintAst.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private int getOrder(PrintAstNode node) {
1212
|
1313
n
1414
order by
15-
loc.getFile().getName(), loc.getStartLine(), loc.getStartColumn(), loc.getEndLine(),
15+
loc.getFile().getAbsolutePath(), loc.getStartLine(), loc.getStartColumn(), loc.getEndLine(),
1616
loc.getEndColumn()
1717
)
1818
}

0 commit comments

Comments
 (0)