Add hls-graph abstracting over shake #1748
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 patch creates a project hls-graph which reexposes the stuff from
shake
which we use. That gives us more flexibility to be explicit about what we are using from Shake, and consider moving to alternatives. Note that we use Shake in two different contexts in HLS, both as a graph underpinning HLS, and as a file-based build system. These two pieces use quite distinct subsets of Shake, so I've converted those that us Shake as an in-memory graph, but not using it as a file-based build system.The context behind this patch is that I'm not convinced Shake is a suitable substrate as we continue to scale. Having reviewed @pepeiborra's patches adding reverse dependencies, it feels increasingly like Shake is trying to serve two masters. Concerns about garbage collection and space leaks with rdeps are problems for both Shake the build system and hls-graph the graph underpinning HLS - but in almost completely opposite ways. (That doesn't mean I don't think we should merge the rdeps into Shake, more that I'm exploring the landscape first.)
This patch doesn't require us to decide whether we use Shake or not. But makes it easier if we decide not to. Locally I have further patches that reimplement this API without Shake, but using the same approach as Shake. I'm just debugging them, and then I'll performance test, and then I imagine we'll want to have a big discussion about them. I don't think splitting the API prejudges that we'll abandon Shake though.