-
Notifications
You must be signed in to change notification settings - Fork 130
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
Fix some varargs issues in scala 2 and scala 3 #433
Draft
jxnu-liguobin
wants to merge
9
commits into
main
Choose a base branch
from
fix-varargs-issues
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+160
−13
Commits on Feb 29, 2024
-
https://github.com/lightbend-labs/scala-logging/issues/354
After wrapping varargs, the user code fails to compile. In Scala 2, there were no inline parameters, and the subtype of args was obtained during compilation. However, this approach may not always be accurate. Regarding #191 There is an issue with obtaining inline parameters in Scala 3. To address this, we recursively obtain the actual value of inline parameters. This necessitates the ongoing use of inlining in the parameters of the wrapper function. For instance: ```scala class LogWrapper(val underlying: Logger) { inline def info(message: String, inline args: AnyRef*): Unit = underlying.info(message, args: _*) } ``` This ensures compatibility and accurate handling of inline parameters in both Scala 2 and Scala 3.
Configuration menu - View commit details
-
Copy full SHA for 7c1a32d - Browse repository at this point
Copy the full SHA 7c1a32dView commit details
Commits on Mar 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1cbde29 - Browse repository at this point
Copy the full SHA 1cbde29View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac2ed10 - Browse repository at this point
Copy the full SHA ac2ed10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14db4cb - Browse repository at this point
Copy the full SHA 14db4cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6e2c8b - Browse repository at this point
Copy the full SHA a6e2c8bView commit details
Commits on Mar 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 59603af - Browse repository at this point
Copy the full SHA 59603afView commit details -
Configuration menu - View commit details
-
Copy full SHA for eba83bc - Browse repository at this point
Copy the full SHA eba83bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1de9edc - Browse repository at this point
Copy the full SHA 1de9edcView commit details
Commits on Mar 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 84698ea - Browse repository at this point
Copy the full SHA 84698eaView commit details
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.