question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove type projections in headers

See original GitHub issue

Scala 3 doesn’t allow these:

[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:58:35 
[warn] 58 |    def apply(values: NonEmptyList[HeaderT#Value]): HeaderT
[warn]    |                                   ^^^^^^^
[warn]    |                              Recurring.this.HeaderT is not a legal path
[warn]    |                              since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:60:21 
[warn] 60 |    def apply(first: HeaderT#Value, more: HeaderT#Value*): HeaderT =
[warn]    |                     ^^^^^^^
[warn]    |                     Recurring.this.HeaderT is not a legal path
[warn]    |                     since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:60:42 
[warn] 60 |    def apply(first: HeaderT#Value, more: HeaderT#Value*): HeaderT =
[warn]    |                                          ^^^^^^^
[warn]    |                              Recurring.this.HeaderT is not a legal path
[warn]    |                              since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:66:28 
[warn] 66 |          acc: NonEmptyList[HeaderT#Value]): NonEmptyList[HeaderT#Value] =
[warn]    |                            ^^^^^^^
[warn]    |                            Recurring.this.HeaderT is not a legal path
[warn]    |                            since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:66:58 
[warn] 66 |          acc: NonEmptyList[HeaderT#Value]): NonEmptyList[HeaderT#Value] =
[warn]    |                                                          ^^^^^^^
[warn]    |                              Recurring.this.HeaderT is not a legal path
[warn]    |                              since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:70:78 
[warn] 70 |              loop(Headers(hs.toList.tail), acc.concatNel(header.values.widen[HeaderT#Value]))
[warn]    |                                                                              ^^^^^^^
[warn]    |                              Recurring.this.HeaderT is not a legal path
[warn]    |                              since it is not a concrete type
[warn] -- Migration Warning: /home/ross/src/http4s/core/src/main/scala/org/http4s/HeaderKey.scala:79:75 
[warn] 79 |              Some(apply(loop(Headers(hs.toList.tail), header.values.widen[HeaderT#Value])))
[warn]    |                                                                           ^^^^^^^
[warn]    |                              Recurring.this.HeaderT is not a legal path
[warn]    |                              since it is not a concrete type

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rossabakercommented, Jan 31, 2021

I think this is difficult one. We may need to rethink header keys entirely.

I think moving it to a type parameter is a plausible path, but then we’ll have to change some HeaderKey references to HeaderKey[A] or HeaderKey[_]. There may be other ways.

Play with it, and if you get stuck, we can all discuss here or on dev gitter.

1reaction
ashwinbhaskarcommented, Jan 30, 2021

I can take this up

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove Content type header when making an http request
I have been trying to upload form-data, but I do not want to send any Content-Type header. I have tried setting
Read more >
Remove Wireless Projection Banner from Desktop screen
is it possible remove the new "Wireless Projection Banner" introduced in 1809 or at the very least move it so that it does...
Read more >
Remove header information from responses sent by your ...
To remove the X-Aspnet-Version HTTP header from each response from ASP.NET, add the following code to the web.config file. Copy <system.web> < ...
Read more >
Removing Content-Type from http header - Forums - IBM
I am processing REST GET and DELETE calls and need to remove Content-Type from the http header. But every time I delete it...
Read more >
Optional HTTP headers | EventStoreDB Documentation
When you append to a stream and don't use the application/vnd.eventstore.events+json/+xml media type, you need to specify an event ID with the event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found