Skip to content

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

@lucassousaf

Description

@lucassousaf

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions