Fork me on GitHub
#polylith
<
2023-02-03
>
Stuart Nath22:02:20

Hello All, After several weeks of normal functionality (creating components, bases, etc.), I get the following error when I try to create components or even call Poly info from the command line. I'm using a Windows OS and didn't make any changes to key operating files. Has anyone seen this issue before or have an idea of where I can start to get Polylith functionality back?

#error {
 :cause EOF while reading
 :via
 [{:type java.lang.RuntimeException
   :message EOF while reading
   :at [clojure.lang.Util runtimeException Util.java 221]}]
 :trace
 [[clojure.lang.Util runtimeException Util.java 221]
  [clojure.lang.LispReader readDelimitedList LispReader.java 1403]
  [clojure.lang.LispReader$MapReader invoke LispReader.java 1355]
  [clojure.lang.LispReader read LispReader.java 285]
  [clojure.lang.LispReader read LispReader.java 216]
  [clojure.lang.LispReader read LispReader.java 205]
  [clojure.lang.RT readString RT.java 1876]
  [clojure.lang.RT readString RT.java 1871]
  [clojure.core$read_string invokeStatic core.clj 3816]
  [polylith.clj.core.common.config.read$read_deps_file invokeStatic read.clj 28]
  [polylith.clj.core.common.interface.config$read_deps_file invokeStatic config.clj 15]
  [polylith.clj.core.workspace_clj.projects_from_disk$read_project invokeStatic projects_from_disk.clj 123]
  [polylith.clj.core.workspace_clj.projects_from_disk$read_projects$fn__26915 invoke projects_from_disk.clj 187]
  [clojure.core$keep$fn__8645$fn__8646 invoke core.clj 7393]
  [clojure.core$filter$fn__5958$fn__5959 invoke core.clj 2823]
  [clojure.lang.PersistentVector reduce PersistentVector.java 343]
  [clojure.core$transduce invokeStatic core.clj 6946]
  [clojure.core$into invokeStatic core.clj 6962]
  [polylith.clj.core.workspace_clj.projects_from_disk$read_projects invokeStatic projects_from_disk.clj 178]
  [polylith.clj.core.workspace_clj.core$toolsdeps_ws_from_disk invokeStatic core.clj 101]
  [polylith.clj.core.workspace_clj.core$workspace_from_disk invokeStatic core.clj 146]
  [polylith.clj.core.workspace_clj.interface$workspace_from_disk invokeStatic interface.clj 4]
  [polylith.clj.core.command.core$read_workspace invokeStatic core.clj 53]
  [polylith.clj.core.command.core$workspace_reader_fn$fn__27093 invoke core.clj 60]
  [polylith.clj.core.command.core$execute invokeStatic core.clj 67]
  [polylith.clj.core.command.interface$execute_command invokeStatic interface.clj 4]
  [polylith.clj.core.poly_cli.core$_main invokeStatic core.clj 31]
  [polylith.clj.core.poly_cli.core$_main doInvoke core.clj 7]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [polylith.clj.core.poly_cli.core main nil -1]]}

2
seancorfield23:02:04

That error indicates an ill-formed deps.edn file somewhere in your repo. It could be an empty file -- that's not valid: it needs to have at least {} in it.

Stuart Nath23:02:15

Thanks again Sean! Knowing where to look helped me find the error quickly.

2
Pragyan Tripathi13:02:45

Also, if you by mistake commented all the content in .clj(s) you will see this error. All the .clj(s) files needs to have atleast top level ns form.

seancorfield04:02:15

@U02JRAM6CBA This error is coming from polylith.clj.core.common.config.read$read_deps_file invokeStatic read.clj 28 so it's definitely a deps.edn file issue (but, yes, if you don't have at least an ns form in a component source file, that will cause a similar error from the poly checker).

💯 2
Pragyan Tripathi05:02:53

Cool. Missed this line. Mostly I have encountered this error when one of the files is corrupted. And it ended up taking a lot of time to find that corrupted file.

seancorfield05:02:43

Yeah, there are a few places where Polylith could help by wrapping I/O operations in a try/`catch` and throwing an ex-info wrapped around the original exception with added information, like the file path that failed.

👍 4
tengstrand08:02:41

Thanks for pointing out this. I created https://github.com/polyfy/polylith/issues/281 issue.

👍 2
2
seancorfield05:02:43
replied to a thread:Hello All, After several weeks of normal functionality (creating components, bases, etc.), I get the following error when I try to create components or even call Poly info from the command line. I'm using a Windows OS and didn't make any changes to key operating files. Has anyone seen this issue before or have an idea of where I can start to get Polylith functionality back? #error { :cause EOF while reading :via [{:type java.lang.RuntimeException :message EOF while reading :at [clojure.lang.Util runtimeException Util.java 221]}] :trace [[clojure.lang.Util runtimeException Util.java 221] [clojure.lang.LispReader readDelimitedList LispReader.java 1403] [clojure.lang.LispReader$MapReader invoke LispReader.java 1355] [clojure.lang.LispReader read LispReader.java 285] [clojure.lang.LispReader read LispReader.java 216] [clojure.lang.LispReader read LispReader.java 205] [clojure.lang.RT readString RT.java 1876] [clojure.lang.RT readString RT.java 1871] [clojure.core$read_string invokeStatic core.clj 3816] [polylith.clj.core.common.config.read$read_deps_file invokeStatic read.clj 28] [polylith.clj.core.common.interface.config$read_deps_file invokeStatic config.clj 15] [polylith.clj.core.workspace_clj.projects_from_disk$read_project invokeStatic projects_from_disk.clj 123] [polylith.clj.core.workspace_clj.projects_from_disk$read_projects$fn__26915 invoke projects_from_disk.clj 187] [clojure.core$keep$fn__8645$fn__8646 invoke core.clj 7393] [clojure.core$filter$fn__5958$fn__5959 invoke core.clj 2823] [clojure.lang.PersistentVector reduce PersistentVector.java 343] [clojure.core$transduce invokeStatic core.clj 6946] [clojure.core$into invokeStatic core.clj 6962] [polylith.clj.core.workspace_clj.projects_from_disk$read_projects invokeStatic projects_from_disk.clj 178] [polylith.clj.core.workspace_clj.core$toolsdeps_ws_from_disk invokeStatic core.clj 101] [polylith.clj.core.workspace_clj.core$workspace_from_disk invokeStatic core.clj 146] [polylith.clj.core.workspace_clj.interface$workspace_from_disk invokeStatic interface.clj 4] [polylith.clj.core.command.core$read_workspace invokeStatic core.clj 53] [polylith.clj.core.command.core$workspace_reader_fn$fn__27093 invoke core.clj 60] [polylith.clj.core.command.core$execute invokeStatic core.clj 67] [polylith.clj.core.command.interface$execute_command invokeStatic interface.clj 4] [polylith.clj.core.poly_cli.core$_main invokeStatic core.clj 31] [polylith.clj.core.poly_cli.core$_main doInvoke core.clj 7] [clojure.lang.RestFn applyTo RestFn.java 137] [polylith.clj.core.poly_cli.core main nil -1]]}

Yeah, there are a few places where Polylith could help by wrapping I/O operations in a try/`catch` and throwing an ex-info wrapped around the original exception with added information, like the file path that failed.

👍 4