-
Notifications
You must be signed in to change notification settings - Fork 74
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
Migrate remote context resolution and distage modules to Cats Effect #4361
Migrate remote context resolution and distage modules to Cats Effect #4361
Conversation
Vocabulary.contexts.metadata -> ContextValue.fromFile("contexts/metadata.json").accepted, | ||
Vocabulary.contexts.error -> ContextValue.fromFile("contexts/error.json").accepted, | ||
Vocabulary.contexts.tags -> ContextValue.fromFile("contexts/tags.json").accepted | ||
implicit val rcr: RemoteContextResolution = RemoteContextResolution.fixedIO( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How we load them in the tests is something we will have to improve at some point
config.sse, | ||
xas | ||
)(jo) | ||
toCatsIO( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the things that we inject from the modules are resolver resolution or contexts from files in the classpath.
With my change, they are now loaded with a Cats IO and instead of changing them, I prefered to migrate the modules themselves as it is a more useful change.
So the modules that have not migrated yet, get these kind of temporary changes but we won't have to go back to those that have been migrated
@@ -28,7 +27,7 @@ object IdentitiesModule extends ModuleDef { | |||
make[CacheConfig].from((cfg: AppConfig) => cfg.identities) | |||
|
|||
make[Identities].fromEffect { (realms: Realms, hc: HttpClient @Id("realm"), config: CacheConfig) => | |||
IdentitiesImpl(realms, hc, config).toUIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These go away in the migrated modules for example
) | ||
)(implicit rcr: RemoteContextResolution): IO[Map[Iri, RemoteContext]] = | ||
jsons.toList | ||
.parTraverse(rcr(_)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know it's it's necessary, but an unordered traverse is available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the toList
Fixes #4359