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

build.sc/mill and shoconConcat #47

Open
larsjaas opened this issue Mar 17, 2019 · 5 comments
Open

build.sc/mill and shoconConcat #47

larsjaas opened this issue Mar 17, 2019 · 5 comments

Comments

@larsjaas
Copy link
Contributor

I've ditched sbt for mill. I'm now wondering how to use shocon in a project, the shoconConcat-task in particular. Is mill supported? Will I need to keep a build.sbt file around for that purpose?

@andreaTP
Copy link
Member

Hi @larsjaas !
a couple of things to say, shocon itself can be used without the sbt-plugin, what you need to do is to make the configuration files available before the compilation task starts (and macros are resolved).
An example of doing it is here:
https://github.com/akka-js/shocon/blob/master/build.sbt#L29
Other than that I think it's pretty straight forward to re-implement this logic ( https://github.com/akka-js/shocon/blob/master/plugin/src/main/scala/org/akkajs/shocon/sbtplugin/ShoconPlugin.scala#L83 ) in as a Mill task.

WDYT?

@larsjaas
Copy link
Contributor Author

Yeah, I doubt it's very difficult, just wondered if I had overlooked a ready-made solution. I'll see what I figure out as I get more familiar with mill, and follow up in this thread if I produce anything that would be of interest to others.

@andreaTP
Copy link
Member

great, thanks! 👍

@larsjaas
Copy link
Contributor Author

Made some progress. Got a working 'shoconConcat' target task hooked up, and I'm able to read config values in my project (didn't find the typesafe shim mentioned in the readme, but Config.fromFile() covered my needs). I still need to inject the task as a compile/run-dependency, and preferably also not have to specify the mill-specific full path of the generated shocon.conf file when reading the file.

@andreaTP
Copy link
Member

Great to hear!
I would love to have a PR with a Readme update about the process if you can!

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

2 participants