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

Base config.edn dev profile include conflicts with other libraries artifact name #112

Open
lucassousaf opened this issue Dec 1, 2022 · 0 comments

Comments

@lucassousaf
Copy link

The base config.edn declares two profile includes for dev and local .

 :duct.profile/dev   #duct/include "dev"
 :duct.profile/local #duct/include "local"

This is a problem for artifact names that start with either dev or local.

For example, if you include the following library to your project:
[dev.gethop/sql-utils "0.4.13"]

When duct starts reading the configuration it will throw the following exception:

Execution error at integrant.core/read-string (core.cljc:155).
EOF while reading

We think the root of the problem is this line in the core library. Because if you run the following:

dev> (io/resource "dev")
#object[java.net.URL 0x482a879d "jar:file:/home/hop/.m2/repository/dev/gethop/sql-utils/0.4.13/sql-utils-0.4.13.jar!/dev"]

you can see that the return value is not the expected one from the duct point of view.

We think that the #duct/include for profiles in the base config of the duct template, should point to existing files explicitly. For example dev.edn and local.edn. That means changing the following lines in the base config of the duct template:

 :duct.profile/dev   #duct/include "dev.edn"
 :duct.profile/local #duct/include "local.edn"

What do you think? Is there are reason for having just dev and local instead of specific file names and extensions?

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

No branches or pull requests

1 participant