Questions tagged [pureconfig]

Github repository

50 questions
6
votes
1 answer

Spark not working with pureconfig

I'm trying to use pureConfig and configFactory for my spark application configuration. here is my code: import pureconfig.{loadConfigOrThrow} object Source{ def apply(keyName: String, configArguments: Config): Source = { keyName.toLowerCase…
Lior Baber
  • 852
  • 3
  • 11
  • 25
4
votes
1 answer

Scala: Creating generic util with PureConfig

I am looking for some utilities in scala which fit akka well that can map HOCON to Scala class/object. (Something like @Configuration in Spring mapping the .yml or .properties file to Configuration bean/Java Class.) What I tried with PureConfig…
Cody
  • 115
  • 1
  • 6
4
votes
1 answer

pureconfig no manual imports of pureconfig.generic.auto._

The latest updates of pureconfig in the 0.10.* series disabled automatic configuration by default. import pureconfig.generic.auto._ needs to be manually imported. But I have a class hierarchy, where I do not want to import it every time for a child…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
4
votes
1 answer

Using PureConfig with Refined?

I have the below conf file: connection.port = 8080 connection.interface = "127.0.0.1" I am trying to use refined and refined-pureconfig when reading this file. I have the below class: import com.api.models.{Config, Connection} import…
Nespony
  • 1,253
  • 4
  • 24
  • 42
4
votes
1 answer

sbt-assembly shading error with shapeless in ubuntu

I’m having a weird issue with sbt-assembly if anyone could help When trying to create fat jar to deploy to Spark with shading applied to shapeless libraries, I am seeing some classes not being renamed when ran in an Ubuntu machine while everything…
kaychaks
  • 1,715
  • 3
  • 21
  • 28
3
votes
1 answer

Scala, PureConfig - how to read json config file?

I have a simple config.json file in my resources: { "configs": [ { "someConfig": { "name": "my_name", "filters": { "name": "new" }, "id": "some-config-id", "fixes": { "isFixed":…
Developus
  • 1,400
  • 2
  • 14
  • 50
3
votes
2 answers

Representing Either in pureconfig

I have a HOCON config like this: [ { name = 1 url = "http://example.com" }, { name = 2 url = "http://example2.com" }, { name = 3 url = { A = "http://example3.com" …
mirelon
  • 4,896
  • 6
  • 40
  • 70
3
votes
0 answers

PureConfig: I cannot read a reference.conf in a sbt Plugin

I created a sbt Plugin, that reads its configuration from a reference.conf. The test in the Plugin works (can read the `reference.conf). Wenn I publish the Plugin, there is the reference.conf in the Root of the Jar. However when running the SBT Task…
pme
  • 14,156
  • 3
  • 52
  • 95
3
votes
1 answer

SBT Threw StackOverflowError During Compilation

The setup for my environment is SBT 1.3.0-RC1, Scala 2.12.8 and Java 1.8.0_212. The SBT threw an exception during compile, [IJ]sbt:foobar> compile [info] Compiling 15 Scala sources and 1 Java source to U:\workspace\foobar\target\scala-2.12\classes…
thlim
  • 2,908
  • 3
  • 34
  • 57
3
votes
2 answers

could not find implicit value for parameter reader: pureconfig.ConfigReader[T]

Could it be even possible to create the following method with the following level of abstraction with Typesafe Config and pureconfig in scala ? I am aware for defined Case Classes that Config Reader has to be specified as follows , because of the…
Yordan Georgiev
  • 5,114
  • 1
  • 56
  • 53
2
votes
1 answer

Pureconfig error: Cannot find an implicit instance of pureconfig.ConfigReader[A]

I'm building a librairy to give access to several catalog of data. A catalog can refer to a database and the associated tables defined in configuration files (HOCON). Here is a config file example (book.conf): author { database = "db_books" …
Adagyo
  • 422
  • 1
  • 4
  • 16
2
votes
2 answers

Pureconfig read config as properties map

Is it possible to make pureconfig read properties as Map[String, String]? I have the following application.conf: cfg{ some.property.name: "value" some.another.property.name: "another value" } Here is the application I tried to read the config…
Some Name
  • 8,555
  • 5
  • 27
  • 77
2
votes
2 answers

standardized method for writing an arbitrary typesafe Config to a hocon file?

in a Scala research application, i load a hocon file using PureConfig's ConfigSource.file() method, which represents the default configuration for a research experiment. i use this to build a batch of variations dynamically. after making a few…
2
votes
3 answers

TypeSafeConfig and PureConfig - load a Map[String, Any] value from config

I'm trying to load up a Map[String, Any] from the config file. It's currently written like this map-name { stringValue = "firstValue" intValue = 1 booleanValue = true } Pureconfig is having trouble reading this config as a Map[String,…
suleydaman
  • 463
  • 1
  • 7
  • 18
2
votes
0 answers

Why does pureconfig not find my implicit readers?

I use double to encode boolean value in a configuration file. PureConfig does not find a way to cast it while reading the configuration. Initial question (see below for edit). Here is some code to reproduce the behavior. import…
AlexisBRENON
  • 2,921
  • 2
  • 18
  • 30
1
2 3 4