Skip to content
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

scala 3: compile and test marshalling, JMH and docs subprojects #4126

Merged
merged 4 commits into from
Aug 23, 2022

Conversation

raboof
Copy link
Member

@raboof raboof commented May 27, 2022

On top of #4079

Three errors remaining around creating case classes from parameters

@@ -69,7 +70,7 @@ object HttpServerWithActorInteraction {
implicit val timeout: Timeout = 5.seconds

// query the actor for the current auction state
val bids: Future[Bids] = (auction ? GetBids).mapTo[Bids]
val bids: Future[Bids] = (auction ? (replyTo => GetBids(replyTo))).mapTo[Bids]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, a bit unfortunate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a typed actor I'd expected being able to do val bids: Future[Bids] = action ? (GetBids(_)) (or ask instead of ? which makes the param list parenthesis's more obvious), without needing the mapTo at all.

@@ -143,7 +144,7 @@ class MiscDirectivesExamplesSpec extends RoutingSpec with CompileOnlySpec {

// tests:
def entityOfSize(size: Int) =
HttpEntity(ContentTypes.`text/plain(UTF-8)`, "0" * size)
HttpEntity(ContentTypes.`text/plain(UTF-8)`, List.fill(size)('0').mkString)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not look more readable...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. Unfortunately "0" * size somehow picks up the * from PathMatchers instead of from StringOps. Since this is just a test I didn't think it's that big of a deal - do you have a nicer way to create an entity of a given size?

raboof added 2 commits June 15, 2022 16:37
Three errors around parameters remaining
@raboof raboof force-pushed the scala-3-compile-jmh-and-docs branch from 4f47923 to 1191ed8 Compare June 15, 2022 15:30
@raboof raboof marked this pull request as ready for review June 15, 2022 15:44
@raboof raboof changed the title scala 3: compile JMH and docs subprojects scala 3: compile and test marshalling, JMH and docs subprojects Jun 22, 2022
@raboof raboof requested a review from jrudolph August 22, 2022 17:35
@@ -69,7 +70,7 @@ object HttpServerWithActorInteraction {
implicit val timeout: Timeout = 5.seconds

// query the actor for the current auction state
val bids: Future[Bids] = (auction ? GetBids).mapTo[Bids]
val bids: Future[Bids] = (auction ? (replyTo => GetBids(replyTo))).mapTo[Bids]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a typed actor I'd expected being able to do val bids: Future[Bids] = action ? (GetBids(_)) (or ask instead of ? which makes the param list parenthesis's more obvious), without needing the mapTo at all.

@raboof raboof merged commit 63b3437 into scala-3 Aug 23, 2022
@raboof raboof mentioned this pull request Aug 23, 2022
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants