Refactor compile, fix bugs, add gazelle and docs #100
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 substantially refactors the root compile and "completeness" checks on solved nodes. It is no longer possible to return from a compile with a node unsolved.
Additionally, the walk-back logic for when a conflicting requirement is discovered has been changed. Python is not well-suited to a fully breadth first solution, since to determine what dependencies a project even has requires downloading each version. Other libraries have attempted to mitigate this with large local registries capturing dependency information and persisting this through multiple compiles. I don't like this statefulness and I don't want to be surprised when a project is walked back to version 0.0.1, which has no dependencies and thus no conflicts.
This PR also adds Gazelle to generate bzl docs and a stardoc target for generating the markup. The markup file has been added to docs.
The default top level WORKSPACE build has been dropped as it's not possible to support modern gazelle and stardoc using WORKSPACE, but test repository still runs during pull requests using WORKSPACE to ensure the repositories and repositories_transitive modules still work.
FYI @abrisco