Skip to content
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

Refactor compile, fix bugs, add gazelle and docs #100

Merged
merged 5 commits into from
Dec 22, 2024

Conversation

sputt
Copy link
Collaborator

@sputt sputt commented Dec 19, 2024

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

@sputt sputt changed the title WIP fixes for compile Refactor compile, fix bugs, add gazelle and docs Dec 20, 2024
@sputt sputt force-pushed the dist-collection-cleanup branch from 87793df to c1e134e Compare December 20, 2024 21:50
@sputt sputt added this pull request to the merge queue Dec 22, 2024
Merged via the queue into master with commit 58695f5 Dec 22, 2024
23 checks passed
sputt added a commit that referenced this pull request Dec 22, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant