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

print the conflict reason before trying an older version of dep in pdm add #2866

Open
goyalyashpal opened this issue May 5, 2024 · 5 comments
Labels
⭐ enhancement Improvements for existing features

Comments

@goyalyashpal
Copy link

goyalyashpal commented May 5, 2024

summaries & titles

  • print the conflict reason before trying an older version of dep in pdm add
  • it would be good to know the reason of why the resolution is failing.

Is your feature/enhancement proposal related to a problem? Please describe.

  • pdm add ... would keep on trying and trying and trying with older and older versions; taking sooo long time
  • with no feedback or any clue to the user of what is happening or if they should intervene.
  • is it due to the arch, the os? or some other dependency? or the toolchain used?

Describe the solution you'd like

a brief/short version of the conflict reason can be shared (optionally)
similar to how a locked pdm add ... i.e. say pdm add tensorflow>=2.16 on windows 10 os immediately shows the following:

ERROR: Unable to find a resolution for tensorflow-cpu-aws
because of the following conflicts:
  tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" (from [email protected])

it is similar but not same as #1639

@goyalyashpal goyalyashpal added the ⭐ enhancement Improvements for existing features label May 5, 2024
@goyalyashpal goyalyashpal changed the title print the conflict reason before trying an older version for pdm add print the conflict reason before trying an older version of dep in pdm add May 5, 2024
@pawamoy
Copy link
Contributor

pawamoy commented May 5, 2024

Have you tried the -v verbose option? IIRC it shows such info.

@goyalyashpal
Copy link
Author

goyalyashpal commented May 5, 2024

hi!

like i said, the output should very short (70-110 "chars" at max per dep, not 70-110 lines lol),
formatted to become even shorter than the one with fixed dep if possible... just as an FYI nudge to the user.
not an essay for debugging.

say smth like:

CONFLICT: from [email protected], can't resolve:
  tensorflow-cpu-aws==2.16.1; (machine == "arm64" or "aarch64") and system == "Linux" 

above is took from following, and reformatted to be even shorter.

ERROR: Unable to find a resolution for tensorflow-cpu-aws
because of the following conflicts:
  tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" (from [email protected])

@frostming
Copy link
Collaborator

but pdm may attempt many times to find the matching version, keeping falling back to older versions. even shortest conflict summary will make the log big, have you imagined how it would look like?

@goyalyashpal
Copy link
Author

goyalyashpal commented May 5, 2024

  • thats why i said optional...
    like many apps allow repeating vs to allow setting verbosity levels

  • the issue currently with pdm is that even single verbose is just too verbose.

  • i think the long scroll backs occur only majorly in case of os things. as the deps specify there further dep straight away.
    but i might be naive here as i have not worked on huge projects


also, the specific is one line per try of a single explicit dep. the heading wont be repeated. so, format would become:

CONFLICT: from tensorflow, can't resolve:
  [email protected]<-tensorflow-cpu-aws==2.16.1; (machine == "arm64" or "aarch64") and system == "Linux" 
  [email protected]<-tensorflow-cpu-aws==2.15.0; (machine == "arm64" or "aarch64") and system == "Linux" 
 ...

@goyalyashpal
Copy link
Author


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

No branches or pull requests

3 participants