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.

Hi,

First of all, thanks a lot for all the work you’ve put into this library! I really like it so far 🤩

I decided to feature it in my upcoming book, you can see the corresponding Pull Request.

The Trading application where it’s being used cross-compiles its domain module to JS/JVM, so I was wondering if Scala.js support was planned at some point? For now, I got away by having two different implementations of the Symbol datatype, one for each platform.


A few other things that would be awesome to add would be Cats’ typeclass instances support. I added the ones I needed in my PR, but I guess it’s so common, this could land in the Cats module (happy to contribute the initial ones!).

import cats.*
import io.github.iltotore.iron.*

object IronCatsInstances:
  inline given [A, B](using inline ev: Eq[A]): Eq[A :| B] = ev.asInstanceOf[Eq[A :| B]]
  inline given [A, B](using inline ev: Order[A]): Order[A :| B] = ev.asInstanceOf[Order[A :| B]]
  inline given [A, B](using inline ev: Show[A]): Show[A :| B] = ev.asInstanceOf[Show[A :| B]]
  • Rename modules’ package
  • Add Cats’ typeclass instances
  • Add ScalaJS and ScalaNative support

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Iltotorecommented, Nov 30, 2022

I should be available this weekend. And even if I’m not, nothing prevents you to submit the PR and I’ll check it as fast as possible.

I would just prefer to have two separated PRs since it’s about two different changes: package renaming and typeclass instances.

1reaction
Iltotorecommented, Nov 30, 2022

Update about the package naming discussion: since it doesn’t seem to disturb the asked users, and since similar projects like Refined use this scheme (aka importing eu.timepit.refined._ + eu.timepit.refined.cats) without complaint from their users, removing the ā€œSupportā€ suffix from compatibility packages (i.e catsSupport -> cats) seems to be the best solution (right now).

Actually, to quote Refined again, the project uses the _root_ import in its ā€œcatsā€ module.

import _root_.cats.{Contravariant, MonadError, Semigroup, Show}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Scala.js
Excellent editor support. With Scala.js, typos and type-errors are immediately caught and shown to you in your editor, without even needing to compile...
Read more >
Implementing Scala.js Support for Scala 3
Supporting Scala.js in Scala 3. Scala 3 has an entirely new compiler codebase, reimplemented from scratch. While many internal concepts such asĀ ...
Read more >
Hands-on Scala.js - Haoyi's Programming Blog
That lets you write Scala code that you can run in a web browser, or other environments (Chrome plugins, Node.js, etc.) where Javascript...
Read more >
Scala.JS - GitHub
Scala.js, the Scala to JavaScript compiler. Contribute to scala-js/scala-js development by creating an account on GitHub.
Read more >
How to use ScalaJS with Scala3 ? : r/scala - Reddit
r/scala icon Go to scala ... Any playground for Scala.js with Scala 2, then set scalaVersion to 3.x. ... Advice on Web Scraper...
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