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

Bootstrap #1

Merged
merged 7 commits into from
Jun 17, 2022
Merged

Bootstrap #1

merged 7 commits into from
Jun 17, 2022

Conversation

armanbilge
Copy link
Member

@armanbilge armanbilge commented Jun 16, 2022

  • fixup the build
  • cross-build for Native
  • add a simple test

@armanbilge armanbilge changed the title Cross-build for Native Bootstrap Jun 16, 2022
@armanbilge
Copy link
Member Author

Ruh-roh?

failing seed for GeneratorsCheck.generates xml is 2vlpy64yIOKuEnqKnWrPi2mnlyiIXmu-8aZUOMf2qcL=
[info] ! GeneratorsCheck.generates xml: Exception raised on property evaluation.
[info] > Exception: java.lang.IllegalArgumentException: ʾ館뭆焲뭓鄹 must be an XML Name
[info] Failed: Total 1, Failed 0, Errors 1, Passed 0
[error] Error during tests:
[error] 	org.typelevel.scalacheck.xml.GeneratorsCheck
[error] (coreNative / Test / test) sbt.TestsFailedException: Tests unsuccessful

@armanbilge armanbilge closed this Jun 16, 2022
@armanbilge armanbilge reopened this Jun 16, 2022
@rossabaker
Copy link
Member

So, I can't build this locally:

sbt:root> coreNative/test
[error] Problem running '/usr/bin/clang --version'. Please check clang setup.
[error] Refer to (http://www.scala-native.org/en/latest/user/setup.html)
[error] (Global / nativeConfig) Problem running '/usr/bin/clang --version'. Please check clang setup.
[error] Refer to (http://www.scala-native.org/en/latest/user/setup.html)
[error] Total time: 1 s, completed Jun 16, 2022, 4:46:58 PM

I need at least three unique JVMs and develop on multiple machines, and that's the "easy" platform. I'm a stickler for development shells. I see the Scala Native instructions have a Nix environment. If that were integrated with typelevel-nix, it'd be fine for me and an increasing number of others, but most new contributors don't use it. (This project won't ever have many contributors, but I don't imagine PRs like this stop here...)

I also don't know anything about Scala Native. If this unblocks something important, I'm willing to give it a try, but I'll be even more helpless than on Scala.js when it acts up. This is likely to become burdensome for you unless there's a critical mass of maintainers with similar interests.

On a less fretful note, having a test is great.

@armanbilge
Copy link
Member Author

/shrug Native for this project isn't important yet, it was just low-hanging fruit. Feel free to remove it.

It sounds to me there is a bigger discussion here for Scala Native and I don't have good answers for you. Scalacheck and Cats already had it, scodec, cats-parse and friends are getting it, and there's interest in it in Cats Effect and up. Contributors seem to manage okay in Cats, but maybe the ones for whom this is a blocker are staying silent.

@rossabaker
Copy link
Member

I haven't built any of those projects locally in months, so this is all new to me. I also thought it was tabled on Cats-Effect long ago, so that revival is also news to me.

I was able to integrate scala-native's Nix script and get a working dev shell on my current machine: typelevel/typelevel-nix#46. That fixes my problem. Others can speak up for themselves. My error came with a nice link, at least.

I'm also concerned about how many people know how to maintain the platform, but nobody is going to use it until there are libraries, and there won't be libraries until people use it, so someone has to bootstrap it. I'm glad you're not as old and tired as me!

@armanbilge
Copy link
Member Author

armanbilge commented Jun 17, 2022

I also thought it was tabled on Cats-Effect long ago, so that revival is also news to me.

It was primarily tabled due to lack of Scala 3 support in Native. It might be tabled again for another reason, I don't know yet. Discussion is in typelevel/cats-effect#1302 (comment).

I'm also concerned about how many people know how to maintain the platform, but nobody is going to use it until there are libraries, and there won't be libraries until people use it, so someone has to bootstrap it.

In theory, Scala Native could be easier to maintain because pretty much everything is upstreamable. Unlike JavaScript, which has multiple runtimes with various restrictions and differing APIs, for Native there is little excuse that the entire JDK and Scala standard library shouldn't be implemented upstream in Scala Native itself (after all, the JVM is able to do it). So in theory targeting Native should the same as targeting the JVM, besides the LLVM.

Of course, that's only theory. It remains to be seen how that holds up in practice. Personally I have no problem drawing a line when the illusion starts breaking down, and sending folks back upstream.

I'm glad you're not as old and tired as me!

I wish I was, I'd probably have better things to do with my time 😄

@rossabaker rossabaker merged commit 88d5eeb into typelevel:main Jun 17, 2022
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.

2 participants