Analysis hints: a hint for a method the hinted type inherits is dropped without a message
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
Hướng nghiên cứu
Start by tracing compileAnalysisHints and the analyzer’s call-site lookup for MethodInfo; the issue describes a mismatch between hint parsing and receiver-type resolution. Reproduce the DirectoryStream.forEach case from the body and inspect how inherited methods are represented. Done means unmatched hints are reported and subtype hints for inherited methods are honored at calls with that receiver type.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A hint class can only annotate methods its type declares. A line for a method the type inherits without overriding is dropped by compileAnalysisHints: it is absent from the generated JSON, the task exits 0 and logs nothing about it.
Seen in #215. DirectoryStream<T> inherits forEach from Iterable. With
class DirectoryStream$<T> {
@Modified @NotNull Iterator<T> iterator() { return null; }
@Modified void forEach(@NotNull Consumer<? super T> action) { }
}
the JSON holds Miterator(0) and no forEach. A call stream.forEach(..) resolves to Iterable.forEach, hinted @NotModified, although it consumes the one-shot stream.
Where it is needed.
DirectoryStream.forEach(#215).- vavr's
io.vavr.collection.Iterator(#212, point 3): it inheritscount,containsAll,existsUnique,reduceLeftOption/reduceRightOption/reduceOption,singleOption,forEachWithIndexandValue.outfromTraversable/Value/Foldable, hinted@NotModifiedthere; on an iterator each consumes the receiver. The same for a vavrIteratorpassed toofAll(Iterable). - In general, any one-shot or consuming subtype of an interface whose default methods are queries.
Wanted.
- The compiler reports a hint line that matches no method of the type, at least as a warning, better as a failure: a silently dropped hint looks like a hint that was applied.
- A way to hint an inherited method for a subtype: the hint is stored on the subtype, and a call whose receiver's static type is that subtype (or below) reads it before the declaring type's. That needs the lookup at the call site to take the receiver type into account, not only the resolved
MethodInfo, so it is an analyzer change as well as a hint-format one.
Until then both cases are accepted imprecision: the hints say @NotModified where the receiver is consumed.
- Ngôn ngữ chính
- Java
- Star
- 1
- Fork
- 1
- Merge trung bình
- 48 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 CodeLaser/maddi
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Javadoc warnings are the only noise on an otherwise clean CI runCó thể làm lại được @jayeshamundkar06-bit đã nhận 27 ngày trước và không có pull request nào đang mở. Đang mởbuild/ci good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của CodeLaser/maddi
Issue tương tự
-
area:cpan-port area:performance bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
fglock/PerlOnJava#2230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoĐang mởBug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Terraform releases proxy leaves a temp folder behind on every cache refreshCó thể đã có người làm @dhananjay6561 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
terrakube-io/terrakube#4069 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày