squint

rafaeldelboni 2025-05-22T13:06:44.965589Z

Question :rename on require should work on squint? https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvc25hYmJkb20iIDpyZW5hbWUge2luaXQgaW5pdC1yZW5hbWVkfV0pCihuaWw%2FIGluaXQtcmVuYW1lZCk%3D I was porting a cljs code base to squint, just for fun and I got a problem with this line: https://github.com/rafaeldelboni/cljs-threejs-rapier-recast/blob/main/src/app/core.cljs#L4 Maybe it's just me doing something wrong.

borkdude 2025-05-25T15:22:22.748879Z

fixed in newly released version

❤️ 1
borkdude 2025-05-22T13:15:39.689219Z

I think there are two bugs here. you should currently use refer + rename together. not sure if this is true in clojure?

borkdude 2025-05-22T13:15:54.759589Z

the other one is that renamed values don't get munged yet, so without the hyphen it should work: https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvc25hYmJkb20iIDpyZWZlciBbaW5pdF0gOnJlbmFtZSB7aW5pdCBpbml0Mn1dKQoobmlsPyBpbml0Mik%3D

borkdude 2025-05-22T13:17:10.166049Z

re the first, yes :refer is required in clojure for renamed values

borkdude 2025-05-22T13:17:17.159919Z

so it's just the munged issue

borkdude 2025-05-22T13:17:22.890769Z

feel free to post an issue

rafaeldelboni 2025-05-22T13:24:48.288459Z

> I think there are two bugs here. you should currently use refer + rename together. not sure if this is true in clojure? This is working on cljs, but maybe I just used it wrong > feel free to post an issue I will

borkdude 2025-05-22T13:25:24.389649Z

it doesn't work with JVM clojure

👍 1
borkdude 2025-05-22T13:25:56.611859Z

cljs.user=> (require '[clojure.walk :refer [prewalk] :rename {postwalk dude}])
Unexpected error (ExceptionInfo) compiling at (<cljs repl>:1:1).
Renamed symbol postwalk not referred at line 1

borkdude 2025-05-22T13:26:09.516959Z

perhaps it works with shadow-cljs but it probably shouldn't

rafaeldelboni 2025-05-22T13:26:27.415159Z

makes sense

rafaeldelboni 2025-05-22T14:04:05.348129Z

https://github.com/squint-cljs/squint/issues/669

🙏 1