Closed alexander-yakushev closed 5 months ago
Thanks!
Given that unfortunately it's red, please limit the changes to removing clj 1.8 and 1.9 from the excludes matrix.
The rest of the improvements can be added immediately afterwards.
I have a feeling that it's red because of differences in JDKs. Let me try to drill it down.
@vemv As the legacy parser targets JDK 8 do we need to run its tests against anything else? Seems like another opportunity to simplify the CI matrix.
I agree it's an unlikely combination, however it's a possible one and results in extended test coverage - important for the intrincate things we do from time to time.
So, the problem seems to be in the invocation of this method here: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/slurp.clj#L57. Files.probeContentType
is platform-dependent and seems to be broken in the Temurin JDK8 image for whatever reason. "Files.probeContentType returns null" is a common Google query.
Any suggestions what should I do with it? I tried to install a couple extra system libraries to the image but it didn't help. Does disabling that particular test in JDK8 sounds an acceptable solution?
Given that unfortunately it's red, please limit the changes to removing clj 1.8 and 1.9 from the excludes matrix. The rest of the improvements can be added immediately afterwards.
I'd rather do it all in one go if you see the ultimate result as beneficial. And if I manage to get the tests passing.
Good catch, thanks! Appreciated.
Please let's operate in baby steps - let's merge the smallest diff that is green, create an issue for the File thing, etc
I'd rather do it all in one go if you see the ultimate result as beneficial
The end result will be great no doubt but I'd highly appreciate operating in an always-green, digestible manner.
I also have other duties, so smaller diffs make it easier for me to context-switch, else I'd have to wait till the weekend or so.
Reduced the scope of this PR. Only exclusions refactored, and Clj1.8*JDK11+ testing dropped.
Looking good, thanks.
I'll have a look again at the new introduced matrix to make sure nothing was unawarely dropped
(Feel free to double-check as well - these can happen)
I noticed that plaintest and smoketest matrices are otherwise identical, so I merged them together. Can undo if there are external reasons to keep them separate.
The PR looks good to me in its current state.
So, the problem seems to be in the invocation of this method here: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/slurp.clj#L57. Files.probeContentType is platform-dependent and seems to be broken in the Temurin JDK8 image for whatever reason. "Files.probeContentType returns null" is a common Google query.
I've been thinking from time to time whether we should retire slurp
, as it's almost a POC that we never really developed into what it was supposed to be. Without it, however, people won't be able to render images in the REPL, so it'd be nice if we came up with a simpler alternative as slurp
+ content-type
were supposed to be generic and handle all sorts of rich data formats. (see https://github.com/clojure-emacs/cider-nrepl/pull/517)
Thanks for the refactoring!
Re: slurp, it would SGTM to disable the related test if orchard.misc/java-api-version
is 8.
After all it seems pretty unlikely that someone would notice the bug (hitting that or
branch + using an old temurin)
Similar to https://github.com/nrepl/nrepl/pull/305