wake.compiler.build_data_model
module
#
CompilationUnitBuildInfo
class
#
Bases: BuildInfoModel
Holds all compilation errors and warnings that occurred during compilation of a single compilation unit. Some errors and warnings may not be associated with any specific source code location. Because of incremental compilation, it is important to keep track of all errors and warnings that occurred during compilation of a compilation unit with a given hash.
Attributes:
Name | Type | Description |
---|---|---|
errors |
List[SolcOutputError]
|
List of compilation warnings and errors that occurred during compilation of the compilation unit. |
Source code in wake/compiler/build_data_model.py
ProjectBuild
class
#
Class holding a single project build.
Source code in wake/compiler/build_data_model.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
interval_trees: Dict[Path, IntervalTree]
property
#
Returns:
Type | Description |
---|---|
Dict[Path, IntervalTree]
|
Mapping of source file paths to interval trees that can be used to query IR nodes by byte offsets in the source code. |
reference_resolver: ReferenceResolver
property
#
Returns:
Type | Description |
---|---|
ReferenceResolver
|
Reference resolver responsible for resolving AST node IDs to IR nodes. Useful especially for resolving references across different compilation units. |
source_units: Dict[Path, SourceUnit]
property
#
Returns:
Type | Description |
---|---|
Dict[Path, SourceUnit]
|
Mapping of source file paths to top-level SourceUnit IR nodes. |
fix_after_deserialization(lsp)
#
Fix the internal state of the project build after pickle deserialization.
Source code in wake/compiler/build_data_model.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
ProjectBuildInfo
class
#
Bases: BuildInfoModel
Attributes:
Name | Type | Description |
---|---|---|
compilation_units |
Dict[str, CompilationUnitBuildInfo]
|
Mapping of compilation unit hex-encoded hashes to compilation unit build info. |
source_units_info |
Dict[str, SourceUnitInfo]
|
Mapping of source unit names to source unit info. |
allow_paths |
FrozenSet[PurePath]
|
Compilation allow_paths used during compilation. |
exclude_paths |
FrozenSet[PurePath]
|
Compilation exclude_paths used during compilation. |
include_paths |
FrozenSet[PurePath]
|
Compilation include_paths used during compilation. |
settings |
Dict[Optional[str], SolcInputSettings]
|
solc input settings used during compilation. |
target_solidity_version |
Dict[Optional[str], SolcInputSettings]
|
Solidity target_version used during compilation, if any. |
wake_version |
str
|
|
incremental |
bool
|
Whether the compilation was performed in incremental mode. |
Source code in wake/compiler/build_data_model.py
SourceUnitInfo
class
#
Bases: BuildInfoModel
Attributes:
Name | Type | Description |
---|---|---|
fs_path |
Path
|
Path to the source unit. |
blake2b_hash |
HexBytes
|
256-bit blake2b hash of the source unit contents. |