Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 22 21:28

    oyvindberg on master

    Followup to #329, initialize `s… (compare)

  • Jul 21 22:52

    oyvindberg on master

    bump docusaurus (compare)

  • Jul 21 22:50

    oyvindberg on gh-pages

    Deploy website Deploy website … (compare)

  • Jul 21 22:49

    oyvindberg on gh-pages

    Deploy website Deploy website … (compare)

  • Jul 21 21:55

    oyvindberg on master

    Fix fallback case for repeated … (compare)

  • Jul 21 21:23

    oyvindberg on generate-more-scala3-syntax

    (compare)

  • Jul 21 21:23

    oyvindberg on master

    Update library-developer.md Mi… Merge pull request #333 from Al… (compare)

  • Jul 17 21:39

    oyvindberg on private-within

    (compare)

  • Jul 17 21:39

    oyvindberg on master

    split ProtectionLevel in TsProt… scalajs: Add ProtectionLevel to… Enable generation of private fa… and 1 more (compare)

  • Jul 17 21:32

    oyvindberg on private-within

    split ProtectionLevel in TsProt… scalajs: Add ProtectionLevel to… Enable generation of private fa… (compare)

  • Jul 17 06:53

    oyvindberg on v1.0.0-beta35

    (compare)

  • Jul 17 06:53

    oyvindberg on gh-pages

    Deploy website Deploy website … (compare)

  • Jul 16 22:35

    oyvindberg on enable-scalajs-defined-traits-by-default-for-scala-3

    (compare)

  • Jul 16 22:20

    oyvindberg on master

    Update sbt-scalafmt to 2.4.3 Merge pull request #328 from sc… (compare)

  • Jul 16 22:17

    oyvindberg on master

    Add support for constant array … Fix a stray type mapping key wh… CLI tool somehow lost the abili… and 1 more (compare)

  • Jul 15 20:07

    oyvindberg on master

    Parser: Add support for members… (compare)

  • Jul 12 11:51

    oyvindberg on master

    fix formatting (compare)

  • Jul 10 21:55

    oyvindberg on master

    Lock down default standard libr… (compare)

  • Jul 10 21:50

    oyvindberg on master

    Less verbose output for source … (compare)

  • Jul 10 21:49

    oyvindberg on master

    Scala3: don't indent top-level … (compare)

Peter Storm
@peterstorm
Hi! I'm trying to get started with your awesome plugin, using Material UI. and Slinky. First I just wanted to see what would happen if I added your plugin and the types for react to the project, and then tried to run it, but this step takes ages, and complains about the time spent on garbagecollection is too long :D
Phase3Compile.scala:125 Building C:\Users\phn.ivy2\local\org.scalablytyped\std_sjs1_2.13\4.0-856cd8\jars\std_sjs1_2.13.jar..
Can I do anything about that?
This is the build.st file:
enablePlugins(ScalaJSBundlerPlugin)
enablePlugins(ScalablyTypedConverterPlugin)

name := "connect-ui"

scalaVersion := "2.13.2"

npmDependencies in Compile += "react" -> "16.13.1"
npmDependencies in Compile += "react-dom" -> "16.13.1"
npmDependencies in Compile += "@types/react" -> "16.9.42"
npmDependencies in Compile += "@types/react-dom" -> "16.9.8"

npmDevDependencies in Compile += "file-loader" -> "6.0.0"
npmDevDependencies in Compile += "style-loader" -> "1.2.1"
npmDevDependencies in Compile += "css-loader" -> "3.5.3"
npmDevDependencies in Compile += "html-webpack-plugin" -> "4.3.0"
npmDevDependencies in Compile += "copy-webpack-plugin" -> "5.1.1"
npmDevDependencies in Compile += "webpack-merge" -> "4.2.2"

libraryDependencies += "me.shadaj" %%% "slinky-web" % "0.6.5"
libraryDependencies += "me.shadaj" %%% "slinky-hot" % "0.6.5"

libraryDependencies += "org.scalatest" %%% "scalatest" % "3.1.1" % Test

scalacOptions += "-Ymacro-annotations"

version in webpack := "4.43.0"
version in startWebpackDevServer:= "3.11.0"

webpackResources := baseDirectory.value / "webpack" * "*"

webpackConfigFile in fastOptJS := Some(baseDirectory.value / "webpack" / "webpack-fastopt.config.js")
webpackConfigFile in fullOptJS := Some(baseDirectory.value / "webpack" / "webpack-opt.config.js")
webpackConfigFile in Test := Some(baseDirectory.value / "webpack" / "webpack-core.config.js")

webpackDevServerExtraArgs in fastOptJS := Seq("--inline", "--hot")
webpackBundlingMode in fastOptJS := BundlingMode.LibraryOnly()

requireJsDomEnv in Test := true

addCommandAlias("dev", ";fastOptJS::startWebpackDevServer;~fastOptJS")

addCommandAlias("build", "fullOptJS::webpack")
Peter Storm
@peterstorm
Well, I added them to the ignore list which I guess is ok, and it was able to run the dev command
Peter Storm
@peterstorm
Yeah, now I tried to add material UI and react router, and its the same deal again
It cant do this :(
Phase3Compile.scala:125 Building C:\Users\phn.ivy2\local\org.scalablytyped\std_sjs1_2.13\4.0-856cd8\jars\std_sjs1_2.13.jar
Øyvind Raddum Berg
@oyvindberg
@peterstorm if you are running sbt from within an IDE, try running it from the terminal. if you're running it from the terminal then google how to give it more heap memory on windows
the problem is that the scala compiler needs say a gigabyte or two of memory to compile this much code
Peter Storm
@peterstorm
roger, thanks
Øyvind Raddum Berg
@oyvindberg
also only use stIgnore to proceed if a library fails to convert, I should update the docs. any references to ignored libraries wont be resolved, so the generated code may be much less useful
Peter Storm
@peterstorm
But when used with Slinky, those types are kind baked in, are they not?
I might be misunderstanding :)
Øyvind Raddum Berg
@oyvindberg
it's a bit more complicated than that
Peter Storm
@peterstorm
Gotcha
Well, it's building alot of stuff now atleast, so thanks!
If I use metals in VsCode
Will it have to go through this every startup then?
Or can it use some cached stuff?
Øyvind Raddum Berg
@oyvindberg
that's good. did you have to adjust some sbt config or environment variables? or is this just the project import in metals which allocates more memory?
no, it'll be cached
you can also share cached conversion runs between machines using remote cache https://scalablytyped.org/docs/remotecache
Peter Storm
@peterstorm
i googled the thing about heap size, and found you coul start sbt like so sbt -men 2048:)
Øyvind Raddum Berg
@oyvindberg
so it'll be instantaneous until you change anything
aha. there are some config files somewhere as well so you don't have to always repeat it
Peter Storm
@peterstorm
Yeah, I'm on windows for work at the moment, and it took too long to figure out where that lives on Windows :D I'm usually a unix guy
mvillafuertem
@mvillafuertem
@peterstorm you can set this options -men 2048 in .sbtops or .jvmopts file
Peter Storm
@peterstorm
Cheers
Damn, material ui core takes ages to build :D I think I have waited for atleast 10 minutes :D
Øyvind Raddum Berg
@oyvindberg
It builds in less than two minutes on my newish laptop, you may want to give sbt even more memory
Peter Storm
@peterstorm
Alright, gotcha
Peter Storm
@peterstorm
I cant get it to build, it just goes on forever
Øyvind Raddum Berg
@oyvindberg
I don't suppose you enabled stEnableScalaJsDefined? that will leave it compiling for 10x as long.
other than that it's hard to say. you can thread dump sbt and see what scalac is up to. you can check how much cpu it uses, if its blowing through most/all cores its likely its stuck in GC, if its mostly stuck at 100% its compiling
Peter Storm
@peterstorm
Oh yes I did :D
I will try removing that, thank you
Peter Storm
@peterstorm
That worked, thanks!
Øyvind Raddum Berg
@oyvindberg
cool, and make sure to checkout the demos
And in case you havent seen, material-ui 3.9.3 is the newest that works well, there is an open issue for version 4+
Peter Storm
@peterstorm
Yeah, i basically snatched the dashboard demo and going to use that to build on further I think :)
Alexis Hernandez
@AlexITC
@oyvindberg I have finally merged my changes to the demos, unfortunately, circleci is failing, do you have idea why? It seems that the process is being killed by a memory error: https://app.circleci.com/pipelines/github/ScalablyTyped/SlinkyDemos/15/workflows/6a607a20-7e39-4003-8fec-ef40ffa5418d/jobs/18
Øyvind Raddum Berg
@oyvindberg
Cool, thanks @AlexITC ! I can take care of ci tomorrow :)
Peter Storm
@peterstorm
Can anyone help me import font-awesome with Slinky? I installed it via npmDependencies, but have no idea how to import it 😅
Peter Storm
@peterstorm
Cheers, thank you! Is there a way to be able to use the classes in className? @oyvindberg
Peter Storm
@peterstorm
Hmmm, having trouble with MaterialUI and the Menu component. It doesn't expose the methods that are usually there with other components :( So I cant set the props for some reason...
Weird, it needed an argument for apply first
Øyvind Raddum Berg
@oyvindberg
Required props need to be provided before you get a builder instance
How about the classnames? What are you trying to do that is not working?