-
Notifications
You must be signed in to change notification settings - Fork 362
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
Proposal: dotty front-end #15
Comments
Was looking into this a bit and found that there is a Dotty (Scala 3) plugin API - http://dotty.epfl.ch/api/dotty/tools/dotc/plugins/Plugin.html Plugin API ported to Dotty - scala/scala3#3438 Thanks for the help @Blaisorblade |
Is there any plan on working on porting Scala Native to dotty? If there is, is there anything where help might be needed? I've been thinking for a couple of weeks on Dotty and Scala Native, and I think that combining the two things can provide a very, very interesting language. As a practical example: dotty's 'opaque types', 'extension methods' and (maybe) 'hard inlining' could make things like CString in SN as performant as in C but with the correct safety What do you think? |
``` Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7de4451 in __strlen_avx2 () from /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libc.so.6 (gdb) bt #0 0x00007ffff7de4451 in __strlen_avx2 () from /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libc.so.6 #1 0x00000000005805b2 in _SM33scala.scalanative.unsafe.package$D11fromCStringL28scala.scalanative.unsafe.PtrL24java.nio.charset.CharsetL16java.lang.StringE () scala-native#2 0x0000000000658399 in _SM47scala.scalanative.nio.fs.UnixFileSystemProviderD10getUserDirL16java.lang.StringE () scala-native#3 0x00000000006583e6 in _SM47scala.scalanative.nio.fs.UnixFileSystemProviderD13fs$lzycomputeL39scala.scalanative.nio.fs.UnixFileSystemE () scala-native#4 0x000000000065856a in _SM47scala.scalanative.nio.fs.UnixFileSystemProviderD13getFileSystemL12java.net.URIL24java.nio.file.FileSystemE () scala-native#5 0x0000000000755482 in _SM26java.nio.file.FileSystems$D13fs$lzycomputeL24java.nio.file.FileSystemE () scala-native#6 0x0000000000754696 in _SM26java.nio.file.FileSystems$D10getDefaultL24java.nio.file.FileSystemE () scala-native#7 0x0000000000700809 in _SM20java.nio.file.Paths$D13fs$lzycomputeL24java.nio.file.FileSystemE () scala-native#8 0x00000000007008c0 in _SM20java.nio.file.Paths$D3getL16java.lang.StringLAL16java.lang.String_L18java.nio.file.PathE () scala-native#9 0x00000000006375fa in _SM34de.bley.scalals.Core$$anonfun$ls$1D5applyL29scala.scalanative.unsafe.ZoneuE () scala-native#10 0x00000000006374f8 in _SM34de.bley.scalals.Core$$anonfun$ls$1D5applyL16java.lang.ObjectL16java.lang.ObjectE () scala-native#11 0x0000000000680a2b in _SM30scala.scalanative.unsafe.Zone$D5applyL15scala.Function1L16java.lang.ObjectE () scala-native#12 0x0000000000670226 in _SM21de.bley.scalals.Core$D2lsL22de.bley.scalals.ConfiguE () scala-native#13 0x00000000006d6170 in _SM36de.bley.scalals.Main$$anonfun$main$1D5applyL22de.bley.scalals.ConfiguE () scala-native#14 0x00000000006d6116 in _SM36de.bley.scalals.Main$$anonfun$main$1D5applyL16java.lang.ObjectL16java.lang.ObjectE () scala-native#15 0x000000000065dfb7 in _SM12scala.OptionD7foreachL15scala.Function1uE () scala-native#16 0x0000000000700e47 in _SM21de.bley.scalals.Main$D4mainLAL16java.lang.String_uE () scala-native#17 0x0000000000680516 in main () ``` Note: starting a JVM in an unlinked directory, results in an Error: ``` Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. at jdk.internal.util.SystemProps$Raw.platformProperties(java.base/Native Method) at jdk.internal.util.SystemProps$Raw.<init>(java.base/SystemProps.java:241) at jdk.internal.util.SystemProps.initProperties(java.base/SystemProps.java:54) at java.lang.System.initPhase1(java.base/System.java:1997) ``` # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Wed Apr 29 22:12:30 2020 +0200 # # HEAD detached from 6cb2caa # Changes to be committed: # modified: javalib/src/main/scala/scala/scalanative/nio/fs/UnixFileSystemProvider.scala # # Untracked files: # javalib/src/main/scala/scala/scalanative/nio/fs/UnixFileSystemProvider.scala_segfault #
@marcesquerra sooner or later Scala Native will be working in Scala 3, that's for sure! I hope that in the summer of autumn of this year we finally focus on Scala 3 Native. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Dotty / Scala 3 support would be added in 0.4.3 |
https://github.com/scala-native/scala-native/tree/topic/dotty-support branch of scala-native together with https://github.com/densh/dotty/tree/nir fork of dotty contains initial work to integrate of dotty as Scala Native fronted. This is far from production ready and needs to be updated to reflect recent changes in the NIR.
The text was updated successfully, but these errors were encountered: