-
Notifications
You must be signed in to change notification settings - Fork 15
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
Reimplement wac-parser
on wac-graph
.
#82
Commits on Apr 14, 2024
-
Reimplement
wac-parser
onwac-graph
.This commit is a complete reimplementation of `wac-parser`'s resolution to be based on `wac-graph`. It also contains an overhaul of the `wac-graph` API to facilitate its use from `wac-parser`: * Reimplements `CompositionGraph` on top of `petgraph::StableDiGraph`, which eliminates needing to keep track of nodes internally to `CompositionGraph`. * Packages now populate their type information into the graph's types collection rather than having their own collections. * Splits the `Error` enum into discrete error types for each graph operation; this allows the AST resolver to properly attach span information to errors. * Add type dependency edges for defined types, ensuring topological ordering. * Fix encoding of defined type aliases so that each encoded alias refers to the export index of the previously encoded type. * Added a debug formatter for `CompositionGraph` that outputs a DOT representation (used in resolution tests as well). * Graph encoding now includes an optional producers custom section. * Fixed toposort to be in ascending node index order for independent nodes. The subtype checker implementation was reverted to the previous implementation, where `invert` and `revert` are called at specific points to change the type of check being performed; the newer implementation did not give the correct "expected, found" error messages for AST resolution. `wac resolve` now outputs a DOT representation of the resolved composition graph instead of JSON. Most of the deleted code comes from code that has already moved into `wac-types` and `wac-graph`. Closes #79. Fixes #78. Fixes #76.
Configuration menu - View commit details
-
Copy full SHA for ff6cf2b - Browse repository at this point
Copy the full SHA ff6cf2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0970c6d - Browse repository at this point
Copy the full SHA 0970c6dView commit details
Commits on Apr 15, 2024
-
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e9092b9 - Browse repository at this point
Copy the full SHA e9092b9View commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fd34bfa - Browse repository at this point
Copy the full SHA fd34bfaView commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6bed3a - Browse repository at this point
Copy the full SHA a6bed3aView commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 18a314d - Browse repository at this point
Copy the full SHA 18a314dView commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 182414c - Browse repository at this point
Copy the full SHA 182414cView commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4998392 - Browse repository at this point
Copy the full SHA 4998392View commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 392a45a - Browse repository at this point
Copy the full SHA 392a45aView commit details -
Update crates/wac-graph/src/graph.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f626337 - Browse repository at this point
Copy the full SHA f626337View commit details -
Configuration menu - View commit details
-
Copy full SHA for e77ae99 - Browse repository at this point
Copy the full SHA e77ae99View commit details -
Fix infinite recursion caused by aliased resources.
This commit fixes an existing bug exposed by the refactoring (likely due to the changes in the order in which nodes are processed for implicit arguments). Previously, an interface might contain a type alias for another resource it owns; this lead to the alias information of the resource being self-referential for the interface containing the aliased resource. It would then lead to infinite recursion in an attempt to remap such an interface when populating implicit instantiation arguments. The fix is to clear the self-referencing information while converting an interface during package parsing.
Configuration menu - View commit details
-
Copy full SHA for 6d44da5 - Browse repository at this point
Copy the full SHA 6d44da5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a94f2ae - Browse repository at this point
Copy the full SHA a94f2aeView commit details -
Update crates/wac-types/src/component.rs
Co-authored-by: Ryan Levick <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b7d5e89 - Browse repository at this point
Copy the full SHA b7d5e89View commit details -
Configuration menu - View commit details
-
Copy full SHA for a38e629 - Browse repository at this point
Copy the full SHA a38e629View commit details