polyfy / polylith

A tool used to develop Polylith based architectures in Clojure.
Eclipse Public License 1.0
519 stars 48 forks source link

Cannot run poly tool in folder containing deps.edn (but no workspace.edn) #477

Closed seancorfield closed 3 months ago

seancorfield commented 3 months ago

Describe the bug The poly tool will not run in a directory that contains deps.edn unless workspace.edn is also present.

To Reproduce Steps to reproduce the behavior:

  1. create a brand new folder mkdir fresh
  2. change into it cd fresh
  3. run poly -- it works and starts a shell
  4. exit the poly shell
  5. create a minimal deps file echo {} > deps.edn
  6. run poly -- it fails with Couldn't open 'workspace.edn': /path/to/fresh/workspace.edn (No such file or directory)

Expected behavior poly should start a shell even when deps.edn is present (and workspace.edn is not).

Versions (please complete the following information):

I believe this is due to some code left over from supporting the old project structure that uses the presence/absence of deps.edn to determine whether this is a new or old project -- it sees deps.edn, assumes it is a new project, and then fails to open workspace.edn

seancorfield commented 3 months ago

Confirmed fixed in latest SNAPSHOT. Thank you!

tengstrand commented 3 months ago

Nice!