clj-commons

borkdude 2024-12-06T10:32:48.507709Z

I wanted to bump jsoup in bb (which is now built in) and it runs hickory tests as part of CI: those failed. I now tried bumping jsoup directly in hickory, which also fails the tests. Branch here: https://github.com/clj-commons/hickory/tree/bump-jsoup I'll try to do some digging what exactly is the difference.

Ashish Shah 2025-01-16T00:23:11.600219Z

Woo. Thank you!

borkdude 2024-12-07T09:46:45.419459Z

Ah good, the author of Jsoup reverted the backward incompatible change :) https://github.com/jhy/jsoup/commit/ed23a9a458bb0674a83f6c63e2bd5b7492fead09

borkdude 2024-12-07T09:46:54.685159Z

Now wait for 1.19.1 to be released

borkdude 2024-12-06T10:44:41.163759Z

It seems parsing the doctype is off:

user=> (h/as-hiccup (h/parse "\n\n<a></a>"))
("" "\n\n" [:html {} [:head {}] [:body {} [:a {}]]])

borkdude 2024-12-06T10:45:03.588899Z

This looks ok though:

user=> (h/parse "\n\n<a></a>")
#object[org.jsoup.nodes.Document 0x6b00ad9 "\n<html>\n <head></head>\n <body>\n  <a></a>\n </body>\n</html>"]

borkdude 2024-12-06T11:04:30.066179Z

Found the issue.

(.attr doc-type "name")
doesn't return anything anymore. I'll file an issue about this

borkdude 2024-12-06T11:10:50.735039Z

filed: https://github.com/jhy/jsoup/issues/2241

borkdude 2025-03-10T20:04:35.876729Z

Alright. I worked together with the author of Jsoup to preserve backward compatibility and I can confirm it worked when bumping Jsoup in hickory. Also tested this hickory change which babashka (with bumped Jsoup), thus confirming stuff works with GraalVM native-image. So I guess it's ready to be merged (and released)

borkdude 2025-03-10T20:05:28.559919Z

cc @slipset

slipset 2025-03-10T20:07:06.574349Z

I’ll look into merging releasing tomorrow?

borkdude 2025-03-10T20:08:25.911859Z

Sure 👍 thanks 🙏

slipset 2025-03-10T20:08:45.842819Z

Mind linking to the PR so I don’t mess up?

borkdude 2025-03-10T20:33:21.714729Z

yeap

borkdude 2025-03-10T20:33:40.643939Z

https://github.com/clj-commons/hickory/pull/91

borkdude 2025-03-10T20:34:54.157829Z

Normally I use the squash feature of Github to make just one merged commit, but if you want me to squash manually or something, just let me know

slipset 2025-03-11T05:32:08.583979Z

I normally squash/merge

ep 2025-03-13T16:48:24.068249Z

hi, don’t know if you’ve seen it but I’m getting a reflection warning since bumping hickory to the latest:

Reflection warning, hickory/core.clj:151:3 - call to static method parse on org.jsoup.Jsoup can't be resolved (argument types: unknown).

ep 2025-03-13T16:52:28.421329Z

should it be type-hinted to String or would that cause problems? Of course, I can also ignore 🙂

borkdude 2025-03-13T16:53:41.137199Z

let's see

borkdude 2025-03-13T16:56:19.575879Z

The method is polymorphic. I think I now remember why I had extra set warn-on-reflection around this to disable it specifically for this call https://jsoup.org/apidocs/org/jsoup/Jsoup.html

borkdude 2025-03-13T16:56:30.086139Z

let me add that back. I removed it shortly before submitting the PR

borkdude 2025-03-13T16:58:06.038809Z

https://github.com/clj-commons/hickory/pull/92 cc @slipset for review + merge

borkdude 2025-03-13T16:58:19.426079Z

originally there was no warn-on-reflection at all, I added the top one as well in the previous PR

🙏 1
slipset 2025-03-13T17:18:11.227269Z

Merged. new release on its way out 0.7.7

slipset 2025-03-13T17:18:25.105009Z

Should be on Clojars in about five mins

❤️ 1
ep 2025-03-13T17:19:32.793759Z

Thank you both!

slipset 2025-03-13T17:22:43.768759Z

No worries, thanks for reporting

slipset 2025-03-11T07:55:13.344869Z

https://clojars.org/org.clj-commons/hickory

borkdude 2025-03-11T08:36:23.073039Z

awesome, thanks!

slipset 2025-03-11T08:48:25.434039Z

My pleasure!