Fork me on GitHub
#aleph
<
2022-12-22
>
Matthew Davidson (kingmob)03:12:42

@p-himik Sorry you had to go through that. We can't really remove the duplicate namespaces, but we can make one import the vars from the other, which should prevent this issue in the future. Fundamentally, single-segment namespaces are problematic, and are discouraged for good reason these days. We know they interfere with Graal, and there's certainly more lurking time bombs, because they violate the widespread assumption that a class will be in a package.

🙏 1
Matthew Davidson (kingmob)10:12:29

Eugene, let us know if that fixes your issue, and if so I'll announce the release more widely

p-himik11:12:13

Fantastic! That seems to be working just fine. Thank you for such a prompt fix.

Matthew Davidson (kingmob)08:12:54

I've also got an updated Aleph 0.6.1 with updated deps, but I think it's going to wait until the new year, since nobody's around... 🎄

🎉 1
dergutemoritz15:01:02

Thanks for the fix, just went through the same pain 😬 @kingmob Happy to help shepherding through a 0.6.1 release!

dergutemoritz15:01:12

Argh, spoke too soon

dergutemoritz15:01:25

Looks like I actually have a different problem, it seemed similar

dergutemoritz15:01:29

Execution error (ClassCastException) at clj_commons.byte_streams.graph.ConversionGraph/assoc_conversion (graph.clj:117).
class clj_commons.byte_streams.graph.Type cannot be cast to class clj_commons.byte_streams.graph.Type (clj_commons.byte_streams.graph.Type is in unnamed module of loader 'app'; clj_commons.byte_streams.graph.Type is in unnamed module of loader clojure.lang.DynamicClassLoader @157345d0)

dergutemoritz15:01:08

Happens when compiling a code base which has a def-conversion . Commenting it out gets rid of the error.

dergutemoritz15:01:16

It does use the new clj-commons.byte-streams namespace tho :thinking_face:

dergutemoritz15:01:01

will try to come up with a minimal repro and file an issue

dergutemoritz15:01:26

OK so far unable to come up with an isolated repro 😕

p-himik15:01:24

Are you 100% sure that the new version of the library is on the classpath?

dergutemoritz15:01:13

yeah pretty much

dergutemoritz15:01:43

no other versions in -Stree or -Spath

p-himik16:01:25

Just to be absolutely sure - you use those flags with the right aliases you actually use when running the app, right? When I was facing this issue, I had to use a step debugger and manually and menially go backwards from the problematic call site. But it worked.

dergutemoritz14:01:03

Intermediate update: Looks like I'm running into https://github.com/clj-commons/byte-streams/issues/34 here, i.e. I'm also aot-compiling sources here but using tools.build rather than Leiningen. https://github.com/clj-commons/byte-streams/issues/26 was a similar issue. I think I might be able to come up with an isolated repro now ...

dergutemoritz14:01:57

ok whittling down ...

Matthew Davidson (kingmob)15:01:05

AOT is always error-prone. At least every other year, I run into a problem caused by an AOT uberjar that has competing classes in it that it shouldn’t. It can be hard to debug since it depends heavily on the classpath order, making it intermittent.

dergutemoritz15:01:04

OK found a way to work around it in my original case

dergutemoritz15:01:47

@kingmob in https://github.com/clj-commons/byte-streams/issues/34#issuecomment-1138535058 you suggested to re-open that issue if it re-surfaces. Do you want me to put my repro in a comment there or rather make separate issue for it?

Matthew Davidson (kingmob)09:01:32

@U06GVE6NR Does the use of deftype+ help any? We can reopen the issue and add to it, or start a new issue. Either is fine with me. More importantly, is this something we can fix or workaround? Or is it, at best, a bug in the clojure compiler we should make people aware of?

dergutemoritz13:01:51

@kingmob deftype+ doesn't make a difference in this situation alas 😕 Thanks for the idea, tho!

dergutemoritz13:01:45

In the light of my latest understanding, I think I would just point to the jira issue in the README, mentioning the error message for discoverability via web search

dergutemoritz13:01:12

Will file an issue anyway!

dergutemoritz13:01:26

Ah interesting, it doesn't even have to do with a custom type being involved

dergutemoritz14:01:42

OK: https://github.com/clj-commons/byte-streams/issues/68 -- was actually able to come up with a fix / workaround!

dergutemoritz15:01:02

Thanks for the fix, just went through the same pain 😬 @kingmob Happy to help shepherding through a 0.6.1 release!