Updated following dependencies as they need changes to the code to work properly:

- Scala
- fs2
- http4s
This commit is contained in:
Rehan Mahmood
2023-10-31 14:24:00 -04:00
parent c9ebd15b23
commit 2a39b2f6a6
64 changed files with 224 additions and 150 deletions

View File

@ -27,7 +27,10 @@ object ConfigFactory {
* 1. if no file is found, read the config from environment variables falling back to
* the default config
*/
def default[F[_]: Async, C: ClassTag: ConfigReader](logger: Logger[F], atPath: String)(
def default[F[_]: Async: Files, C: ClassTag: ConfigReader](
logger: Logger[F],
atPath: String
)(
args: List[String],
validation: Validation[C]
): F[C] =
@ -74,7 +77,7 @@ object ConfigFactory {
/** Uses the first argument as a path to the config file. If it is specified but the
* file doesn't exist, an exception is thrown.
*/
private def findFileFromArgs[F[_]: Async](args: List[String]): F[Option[Path]] =
private def findFileFromArgs[F[_]: Async: Files](args: List[String]): F[Option[Path]] =
args.headOption
.map(Path.apply)
.traverse(p =>
@ -89,7 +92,7 @@ object ConfigFactory {
* to giving the file as argument, it is not an error to specify a non-existing file
* via a system property.
*/
private def checkSystemProperty[F[_]: Async]: OptionT[F, Path] =
private def checkSystemProperty[F[_]: Async: Files]: OptionT[F, Path] =
for {
cf <- OptionT(
Sync[F].delay(