Profiles include files should be more specific #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The default profile includes in the base
config.edn
file conflict with other libraries artifact names, if those artifact names havedev
orlocal
as their fist "path component".The base
config.edn
declares two profile includes::duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
This is a problem for artifact names that start with either
dev
orlocal
.For example, if you add the following depenency library to your (Leiningen) 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
The root of the problem is the line at
https://github.com/duct-framework/core/blob/28de7df11af9c95ceb157d0c5163c061a75554b3/src/duct/core.clj#L89 in the
core
library. Because if you run the following code snippet in a REPL from the a project containing the above dependency:you can see that the return value is not the expected one from the Duct point of view (the
dev.edn
file in the project directory), but thedev
directory from the dependency jar file.The profile includes in the base config of the Duct template should point to the project files explicitly.
[Fixes: #112]