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: split on site-packages path segment when reporting conflicts (#413)
When expanding wheels via rules_pycross' `pycross_wheel_library`, the
wheels end up in `bazel-out`, rather than within the runfiles tree like
when consuming from rules_python. To account for this, change the
delimiter to `site-packages/` given that is the actual common ancestor
in the path.
This also changes to using the full paths for reporting the conflict to
make it easier to see where the incoming conflict is from.
Closes#359
---
### Changes are visible to end-users: yes
- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes
Use `site-packages/` as path delimiter when reporting venv package
conflicts.
### Test plan
- Covered by existing test cases
- Manual testing; please provide instructions so we can reproduce:
Run against https://github.com/tgeng/pycross_venv_bug_repro
letmut diag = MietteDiagnostic::new("Conflicting symlinks found when attempting to create venv. More than one package provides the file at these paths".to_string())
153
164
.with_severity(severity)
154
165
.with_labels([
155
-
LabeledSpan::at(0..path_to_conflict.len(),"Existing file in virtual environment"),
156
-
LabeledSpan::at((path_to_conflict.len() + 1)..(path_to_conflict.len() + 1 + next_conflict.len()),"Next file to link"),
166
+
LabeledSpan::at(link_span_range,"Existing file in virtual environment"),
167
+
LabeledSpan::at(conflict_span_range,"Next file to link"),
157
168
]);
158
169
159
170
diag = if severity == Severity::Error{
@@ -162,7 +173,11 @@ fn create_symlink(
162
173
diag.with_help("Set `package_collisions = \"ignore\"` on the binary or test rule to ignore this warning")
0 commit comments