Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix on Conman #140

Merged
merged 1 commit into from
May 7, 2024
Merged

Bugfix on Conman #140

merged 1 commit into from
May 7, 2024

Conversation

whamtet
Copy link
Contributor

@whamtet whamtet commented May 7, 2024

@yogthos

A few months ago you kindly accepted my PR to allow multiple hugsql scripts in system.edn. The previous code inspects file edit time and if it has updated reloads conman. Now that we have multiple files we have to map over all the file edit times but of course map is lazy. As a result the previous edit times would get evaluated at the same time as the current one and never show any difference (!). Very easy fix!

Matt

@yogthos
Copy link
Collaborator

yogthos commented May 7, 2024

thanks, by the way you can also use mapv which is eager. :)

@yogthos yogthos merged commit 5d53ae4 into kit-clj:master May 7, 2024
1 check passed
@gerdint
Copy link
Contributor

gerdint commented May 7, 2024

This was probably my bad. I do remember testing it but looking at the code I cannot understand how... Anyways, thanks for fixing it!

@yogthos
Copy link
Collaborator

yogthos commented May 7, 2024

teamwork :)

@yogthos
Copy link
Collaborator

yogthos commented May 24, 2024

@gerdint @whamtet so, it turns out that we have a new problem now, eager evaluation looks to be causing an error running from the uberjar

1429  INFO  server.app.env -
-=[app started successfully]=-
1430  INFO  kit.config - Reading config system.edn
1633  ERROR server.app.core - {:what :uncaught-exception, :exception #error {
 :cause nil
 :via
 [{:type clojure.lang.ExceptionInfo
   :message Error on key :db.sql/query-fn when building system
   :data {:reason :integrant.core/build-threw-exception, :system {:db.sql/connection #object[com.zaxxer.hikari.HikariDataSource 0x7906de2f HikariDataSource (HikariPool-1)]}, :function #object[clojure.lang.MultiFn 0x574f89bf clojure.lang.MultiFn@574f89bf], :key :db.sql/query-fn, :value {:conn #object[com.zaxxer.hikari.HikariDataSource 0x7906de2f HikariDataSource (HikariPool-1)], :options {}, :filename queries.sql}}
   :at [integrant.core$build_exception invokeStatic core.cljc 296]}
  {:type java.nio.file.FileSystemNotFoundException
   :message nil
   :at [jdk.nio.zipfs.ZipFileSystemProvider getFileSystem ZipFileSystemProvider.java 156]}]

@yogthos
Copy link
Collaborator

yogthos commented May 24, 2024

@whamtet
Copy link
Contributor Author

whamtet commented May 24, 2024

Great work @yogthos

@gerdint
Copy link
Contributor

gerdint commented May 28, 2024

Thanks @yogthos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants