Skip to content

Conversation

@tiran
Copy link
Collaborator

@tiran tiran commented Jan 23, 2026

The new resole package subcommand is designed to debug Fromager settings and resolver properties. It compares the results from Fromager's internal resolver with a simple PyPI lookup. It prints informations like resolver configuration, detected versions and versions with sdists and wheels on PyPI.

$ fromager --debug resolve package 'fromager~=0.68.0'
15:28:52 INFO loading settings from .../overrides/settings.yaml
15:28:52 INFO fromager: resolving requirement for 'fromager~=0.68.0'
15:28:52 INFO fromager: sdist server url: https://pypi.org/simple/
15:28:52 INFO fromager: resolver includes sdists: True
15:28:52 INFO fromager: resolver includes wheels: False
15:28:52 INFO fromager: download url: None
15:28:52 INFO fromager: get_resolver_provider returns 'PyPIProvider'
15:28:52 INFO fromager: found 2 Fromager candidates with 2 unique versions
15:28:52 INFO fromager: Fromager versions: 0.68.0, 0.68.1
15:28:52 INFO fromager: found 2 versions on PyPI
15:28:52 INFO fromager: PyPI versions: 0.68.0, 0.68.1
15:28:52 INFO fromager: - with sdists: 0.68.0, 0.68.1
15:28:52 INFO fromager: - with wheels: 0.68.0, 0.68.1

@tiran
Copy link
Collaborator Author

tiran commented Jan 23, 2026

I'm marking this as a draft, because I have not added documentation and tests for the new code.

@mergify mergify bot added the ci label Jan 23, 2026
@rd4398
Copy link
Contributor

rd4398 commented Jan 23, 2026

I maybe wrong, but can we name the command as fromager debug resolver?

fromager resolve package is sounding like we are running fromager's bootstrap command under the hood

The new `resole package` subcommand is designed to debug Fromager
settings and resolver properties. It compares the results from
Fromager's internal resolver with a simple PyPI lookup. It prints
informations like resolver configuration, detected versions and versions
with sdists and wheels on PyPI.

```
$ fromager --debug resolve package 'fromager~=0.68.0'
15:28:52 INFO loading settings from .../overrides/settings.yaml
15:28:52 INFO fromager: resolving requirement for 'fromager~=0.68.0'
15:28:52 INFO fromager: sdist server url: https://pypi.org/simple/
15:28:52 INFO fromager: resolver includes sdists: True
15:28:52 INFO fromager: resolver includes wheels: False
15:28:52 INFO fromager: download url: None
15:28:52 INFO fromager: get_resolver_provider returns 'PyPIProvider'
15:28:52 INFO fromager: found 2 Fromager candidates with 2 unique versions
15:28:52 INFO fromager: Fromager versions: 0.68.0, 0.68.1
15:28:52 INFO fromager: found 2 versions on PyPI
15:28:52 INFO fromager: PyPI versions: 0.68.0, 0.68.1
15:28:52 INFO fromager: - with sdists: 0.68.0, 0.68.1
15:28:52 INFO fromager: - with wheels: 0.68.0, 0.68.1
```

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Copy link
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to align the UX of this command and list-versions. That one has CLI switches to control the type of package allowed, for example, which could be useful here for testing if configuration changes help with a problem.

We should also work out some naming conventions. As we get more commands, they aren't as nicely organized as they could be. I like systems that use "noun verb" because if I know the noun then tab completion can help me find the verbs. So in this case we might have "package resolve" for this command and "package list-versions" for the other.

Perhaps the 2 commands should be merged with "list-versions" becoming a --all flag on "package resolve"?

None of these comments should block this from merging, but it would be good to work out a plan and clean things up afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants