rs-parsepatch misses some diffs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Start by running the Python reproduction against rs_parsepatch.get_diffs with the supplied patch and confirm that it yields 2 instead of 3. Trace how get_diffs handles the two files and their hunks, then verify that the corrected behavior reports all 3 diffs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Assuming that variable path is a patch defined in the following python code:
import rs_parsepatch
patch = """
--- a/js/src/vm/Printer.cpp 2023-06-20 15:04:32.907323769 +0000
+++ b/js/src/vm/Printer.cpp 2023-06-20 15:05:18.491323769 +0000
@@ -52,7 +52,7 @@
}
bool GenericPrinter::put(mozilla::Span<const char16_t> str) {
- for (char16_t c: str) {
+ for (char16_t c : str) {
if (!putChar(c)) {
return false;
}
@@ -245,7 +245,7 @@
return false;
}
- for (char16_t c: str) {
+ for (char16_t c : str) {
MOZ_ASSERT(IsAsciiPrintable(c));
*bp++ = char(c);
}
--- a/js/src/vm/BytecodeUtil.cpp 2023-06-20 15:04:32.907323769 +0000
+++ b/js/src/vm/BytecodeUtil.cpp 2023-06-20 15:05:18.439323769 +0000
@@ -2308,9 +2308,7 @@
MOZ_CRASH("No binding");
}
-UniqueChars ExpressionDecompiler::getOutput() {
- return sprinter.release();
-}
+UniqueChars ExpressionDecompiler::getOutput() { return sprinter.release(); }
} // anonymous namespace
"""
diffs = 0
for diff in rs_parsepatch.get_diffs(patch):
diffs += 1
print(diffs)
Expected behaviour would be to have printed out 3 but in this case we have 2, which is wrong.
This has been tested and reproduced on the latest version: 0.3.9
- Ngôn ngữ chính
- Rust
- Star
- 8
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mozilla/pyo3-parsepatch
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mozilla/pyo3-parsepatch#44 · 1 bình luận ·
-
Support alpine Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mozilla/pyo3-parsepatch#16 ·
Tất cả issue của mozilla/pyo3-parsepatch
Issue tương tự
-
risk:low runtime status:in-progress type:test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
bevyengine/bevy#25861 ·