-
Notifications
You must be signed in to change notification settings - Fork 75
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
Use UUIDGen
instead of randomUUID()
#678
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ val Scala213 = "2.13.8" | |
val Scala212 = "2.12.16" | ||
val Scala3 = "3.1.3" | ||
|
||
ThisBuild / tlBaseVersion := "2.4" | ||
ThisBuild / tlBaseVersion := "2.5" | ||
ThisBuild / crossScalaVersions := Seq(Scala213, Scala212, Scala3) | ||
ThisBuild / scalaVersion := Scala213 | ||
ThisBuild / startYear := Some(2018) | ||
|
@@ -46,18 +46,14 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) | |
.settings( | ||
name := "log4cats-core", | ||
libraryDependencies ++= Seq( | ||
"org.typelevel" %%% "cats-core" % catsV | ||
"org.typelevel" %%% "cats-core" % catsV, | ||
"org.typelevel" %%% "cats-effect-std" % catsEffectV | ||
), | ||
libraryDependencies ++= { | ||
if (tlIsScala3.value) Seq.empty | ||
else Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided) | ||
} | ||
) | ||
.jsSettings( | ||
// https://www.scala-js.org/news/2022/04/04/announcing-scalajs-1.10.0#fixes-with-compatibility-concerns | ||
libraryDependencies += ("org.scala-js" %%% "scalajs-java-securerandom" % "1.0.0") | ||
.cross(CrossVersion.for3Use2_13) | ||
) | ||
Comment on lines
-56
to
-60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although in theory this dependency is secure, in practice it is not safe to rely on. See discussion in: |
||
|
||
lazy val testing = crossProject(JSPlatform, JVMPlatform) | ||
.settings(commonSettings) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Just to keep the initial goal of having the core module CE-less, can we introduce an internal interface for UUIDGen and its implementation within the slf4j module?
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.
Can we instead create a new module that is explicitely dependent on CE? And move the correct version of this there?
I feel like re-defining a UUIDGen equivalent leads to a lot of confusion and bad UX. Instead, having a
log4cats-core
package that is honest about its limitations, and an extensionlogs4cats-ce
(naming is hard) that overcomes aforementioned limitations might be better.Although not entirely sure how to pull this off in a bincompat and user friendly way.
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 agree, adding a "
log4cats-effect
" would be better for UX, but still not great for UX+bincompat.Just so that we are clear: what are the arguments against just have a CE dependency in the core module?
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.
Very good question! I personally don't know since I probably missed those discussions during my absence. 🙈 Personally I think it's ok to have CE in
core
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 can only guess, but perhaps the reason is to apply the Rule of Least Power. But once again, I'm not sure if this is a thing still.
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 would say it is a thing still :) The problem is the repo is currently applying the principle of too-little-power. This is a course-correction.