You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: preserve DependencyReference through download pipeline (#382) (#383)
* fix: preserve DependencyReference through download pipeline (#382)
Subdirectory packages on non-GitHub/ADO hosts (e.g. GitLab, Gitea) failed
because the download pipeline converted DependencyReference to a string
via str() and re-parsed it in download_package(). The str() → parse()
round-trip lost the repo_url / virtual_path boundary on generic hosts
where _detect_virtual_package() uses a dynamic min_base_segments heuristic.
Fix: pass the structured DependencyReference object through the pipeline
instead of flattening to string. Specifically:
- download_package() and resolve_git_reference() now accept
Union[str, DependencyReference], skipping the parse when already
structured
- build_download_ref() returns a DependencyReference (via
dataclasses.replace) instead of a flat string
- All call sites in install.py and _utils.py updated to pass the
object directly
Closes#382
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address Copilot review feedback
- Normalize original_ref to string in resolve_git_reference() to avoid
leaking DependencyReference objects into ResolvedReference.original_ref
- Replace shallow test with one that verifies DependencyReference.parse()
is NOT called when passing a structured object to download_package()
- Update test_resolve_git_reference_branch to match normalized original_ref
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Sergio Sisternes <sergio.sisternes@epam.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments