PS: Add API graphs and models-as-data libraries #134
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes quite a few large changes to PowerShell:
There is still quite a few TODOs related to api graphs, so I don't expect this to work well everywhere yet. But it works for my local testing of flow sources.
Testing
I've not added any testing of this yet since I don't know what the best way to do this is. The problem is that, as I mentioned in #132, certain PowerShell modules are implicitly loaded from a path that's given by an environment variable which points to a set of manifest hash tables. So without extracting these manifest hash tables, we can't resolve those calls.
In #133 I disabled extraction of these hash tables in tests since we'd get spurious test changes depending on the environment in which the scripts were extracted. So we need to come up with a mock environment variable to extract "mock manifest files" for testing purposes. I've decided to delay this, though.