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

zio-http 3.0.0-RC10 cannot be compiled with ScalaJS 1.16.0 #3087

Closed
dobrynya opened this issue Sep 3, 2024 · 5 comments · Fixed by #3090
Closed

zio-http 3.0.0-RC10 cannot be compiled with ScalaJS 1.16.0 #3087

dobrynya opened this issue Sep 3, 2024 · 5 comments · Fixed by #3090
Labels
💎 Bounty bug Something isn't working 💰 Rewarded

Comments

@dobrynya
Copy link

dobrynya commented Sep 3, 2024

Describe the bug
When compiling with fastLinkJS I get the following error message

[error] Referring to non-existent method static java.lang.Long.parseLong(java.lang.CharSequence,int,int,int)long
[error]   called from private zio.http.codec.PathCodec.decodeSubstring(java.lang.String,[zio.http.codec.PathCodec$Opt,java.util.Deque)java.lang.String
[error]   called from zio.http.codec.PathCodec.decode(zio.http.Path)scala.util.Either
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decodePaths$$anonfun$1(zio.http.codec.PathCodec,zio.http.Path)java.lang.Object
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decodePaths(zio.http.Path,[java.lang.Object)void
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decode$$anonfun$2(zio.http.URL,zio.http.codec.CodecConfig,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   called from zio.http.codec.internal.EncoderDecoder$Single.decode(zio.http.codec.CodecConfig,zio.http.URL,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   dispatched from zio.http.codec.internal.EncoderDecoder.decode(zio.http.codec.CodecConfig,zio.http.URL,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   called from zio.http.codec.HttpCodec.decodeResponse(zio.http.Response,zio.http.codec.CodecConfig,java.lang.Object)zio.ZIO
[error]   called from private zio.http.endpoint.internal.EndpointClient.execute$$anonfun$1(java.lang.Object,zio.http.Response)zio.ZIO
[error]   called from zio.http.endpoint.internal.EndpointClient.execute(zio.http.ZClient,zio.http.endpoint.Invocation,zio.ZIO,zio.http.codec.Combiner,java.lang.Object)zio.ZIO
[error]   called from private zio.http.endpoint.EndpointExecutor.apply$$anonfun$2(zio.http.endpoint.Invocation,java.lang.Object,zio.http.endpoint.internal.EndpointClient)zio.ZIO
[error]   called from zio.http.endpoint.EndpointExecutor.apply(zio.http.endpoint.Invocation,java.lang.Object)zio.ZIO
[error]   called from private myorg.frontend.PublicServer.loadKeycloakConfig$$anonfun$1()zio.ZIO
[error]   called from myorg.frontend.PublicServer.loadKeycloakConfig()zio.ZIO
[error]   called from myorg.frontend.security.SecurityService$.make(myorg.frontend.PublicServer)zio.ZIO
[error]   called from myorg.frontend.UnauthenticatedPage.init()scala.Tuple2
[error]   dispatched from myorg.frontend.Component.init()scala.Tuple2
[error]   called from myorg.frontend.MainPage.init()scala.Tuple2
[error]   called from myorg.frontend.App$.init(scala.collection.immutable.Map)scala.Tuple2
[error]   dispatched from tyrian.TyrianApp.init(scala.collection.immutable.Map)scala.Tuple2
[error]   called from private tyrian.TyrianApp._init(scala.collection.immutable.Map)scala.Tuple2
[error]   called from tyrian.TyrianApp.ready(org.scalajs.dom.Element,scala.collection.immutable.Map)void
[error]   called from tyrian.TyrianApp.launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)void
[error]   called from tyrian.TyrianApp.$js$exported$meth$launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)java.lang.Object
[error]   called from myorg.frontend.App$.$js$exported$meth$launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)java.lang.Object
[error]   exported to JavaScript with @JSExport
[error] involving instantiated classes:
[error]   zio.http.codec.internal.EncoderDecoder$Single
[error]   zio.http.endpoint.internal.EndpointClient
[error]   zio.http.endpoint.EndpointExecutor
[error]   myorg.frontend.PublicServer
[error]   myorg.frontend.security.SecurityService$
[error]   myorg.frontend.UnauthenticatedPage
[error]   myorg.frontend.MainPage
[error]   myorg.frontend.App$
[error] Referring to non-existent method static java.lang.Integer.parseInt(java.lang.CharSequence,int,int,int)int
[error]   called from private zio.http.codec.PathCodec.decodeSubstring(java.lang.String,[zio.http.codec.PathCodec$Opt,java.util.Deque)java.lang.String
[error]   called from zio.http.codec.PathCodec.decode(zio.http.Path)scala.util.Either
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decodePaths$$anonfun$1(zio.http.codec.PathCodec,zio.http.Path)java.lang.Object
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decodePaths(zio.http.Path,[java.lang.Object)void
[error]   called from private zio.http.codec.internal.EncoderDecoder$Single.decode$$anonfun$2(zio.http.URL,zio.http.codec.CodecConfig,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   called from zio.http.codec.internal.EncoderDecoder$Single.decode(zio.http.codec.CodecConfig,zio.http.URL,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   dispatched from zio.http.codec.internal.EncoderDecoder.decode(zio.http.codec.CodecConfig,zio.http.URL,zio.http.Status,zio.http.Method,zio.http.Headers,zio.http.Body,java.lang.Object)zio.ZIO
[error]   called from zio.http.codec.HttpCodec.decodeResponse(zio.http.Response,zio.http.codec.CodecConfig,java.lang.Object)zio.ZIO
[error]   called from private zio.http.endpoint.internal.EndpointClient.execute$$anonfun$1(java.lang.Object,zio.http.Response)zio.ZIO
[error]   called from zio.http.endpoint.internal.EndpointClient.execute(zio.http.ZClient,zio.http.endpoint.Invocation,zio.ZIO,zio.http.codec.Combiner,java.lang.Object)zio.ZIO
[error]   called from private zio.http.endpoint.EndpointExecutor.apply$$anonfun$2(zio.http.endpoint.Invocation,java.lang.Object,zio.http.endpoint.internal.EndpointClient)zio.ZIO
[error]   called from zio.http.endpoint.EndpointExecutor.apply(zio.http.endpoint.Invocation,java.lang.Object)zio.ZIO
[error]   called from private myorg.frontend.PublicServer.loadKeycloakConfig$$anonfun$1()zio.ZIO
[error]   called from myorg.frontend.PublicServer.loadKeycloakConfig()zio.ZIO
[error]   called from myorg.frontend.security.SecurityService$.make(myorg.frontend.PublicServer)zio.ZIO
[error]   called from myorg.frontend.UnauthenticatedPage.init()scala.Tuple2
[error]   dispatched from myorg.frontend.Component.init()scala.Tuple2
[error]   called from myorg.frontend.MainPage.init()scala.Tuple2
[error]   called from myorg.frontend.App$.init(scala.collection.immutable.Map)scala.Tuple2
[error]   dispatched from tyrian.TyrianApp.init(scala.collection.immutable.Map)scala.Tuple2
[error]   called from private tyrian.TyrianApp._init(scala.collection.immutable.Map)scala.Tuple2
[error]   called from tyrian.TyrianApp.ready(org.scalajs.dom.Element,scala.collection.immutable.Map)void
[error]   called from tyrian.TyrianApp.launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)void
[error]   called from tyrian.TyrianApp.$js$exported$meth$launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)java.lang.Object
[error]   called from myorg.frontend.App$.$js$exported$meth$launch(org.scalajs.dom.Element,scala.scalajs.js.Dictionary)java.lang.Object
[error]   exported to JavaScript with @JSExport
[error] involving instantiated classes:
[error]   zio.http.codec.internal.EncoderDecoder$Single
[error]   zio.http.endpoint.internal.EndpointClient
[error]   zio.http.endpoint.EndpointExecutor
[error]   myorg.frontend.PublicServer
[error]   myorg.frontend.security.SecurityService$
[error]   myorg.frontend.UnauthenticatedPage
[error]   myorg.frontend.MainPage
[error]   myorg.frontend.App$
[error] There were linking errors
[error] (Compile / fastLinkJS) There were linking errors

To Reproduce
It needs to try compiling a code using zio-http Endpoint, EndpointLocation and EndpointExecutor with Authentication.Bearer type

Expected behaviour
Generated JavaScript should be successfully compiled and should be able to make specified requests

Desktop (please complete the following information):

  • OS: Windows 11
  • JVM: temurin-17.0.12
  • Scala 3.5.0, Scala JS 1.16.0
  • SBT 1.10.0
  • zio-http 3.0.0-RC10
@dobrynya dobrynya added the bug Something isn't working label Sep 3, 2024
@jdegoes
Copy link
Member

jdegoes commented Sep 3, 2024

/bounty $125

Copy link

algora-pbc bot commented Sep 3, 2024

💎 $125 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #3087 with your implementation plan
  2. Submit work: Create a pull request including /claim #3087 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-http!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @987Nabil Sep 3, 2024, 4:20:54 PM #3090

@987Nabil
Copy link
Contributor

987Nabil commented Sep 3, 2024

/attempt #3087

Algora profile Completed bounties Tech Active attempts Options
@987Nabil    85 ZIO bounties
+ 1 bounty from 1 project
Scala
Cancel attempt

Copy link

algora-pbc bot commented Sep 4, 2024

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented Sep 6, 2024

🎉🎈 @987Nabil has been awarded $125! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty bug Something isn't working 💰 Rewarded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants