class Dependabot::Uv::UpdateChecker::PipCompileVersionResolver
def check_original_requirements_resolvable
boolean, so that all deps for this repo will raise identical
Note: We raise errors from this method, rather than returning a
Needed because pip-compile's resolver isn't perfect.
def check_original_requirements_resolvable SharedHelpers.in_a_temporary_directory do SharedHelpers.with_git_configured(credentials: credentials) do write_temporary_dependency_files(update_requirement: false) filenames_to_compile.each do |filename| options = pip_compile_options(filename) options_fingerprint = pip_compile_options_fingerprint(options) run_pip_compile_command( "pyenv exec uv pip compile #{options} #{filename}", fingerprint: "pyenv exec uv pip compile #{options_fingerprint} <filename>" ) end true rescue SharedHelpers::HelperSubprocessFailed => e # Pick the error message that includes resolvability errors, this might be the cause from # handle_pip_compile_errors (it's unclear if we should always pick the cause here) error_message = [e.message, e.cause&.message].compact.find do |msg| msg.include?(RESOLUTION_IMPOSSIBLE_ERROR) end cleaned_message = clean_error_message(error_message || "") raise if cleaned_message.empty? raise DependencyFileNotResolvable, cleaned_message end end end