oyvindberg on v1.0.0-beta38
oyvindberg on gh-pages
Deploy website Deploy website … (compare)
oyvindberg on master
release: bump scalajs and sbt i… make TypeParamsReferencedInTree… Make props unpacking from #444 … (compare)
oyvindberg on master
scalafmt (compare)
oyvindberg on master
support new NotNeededPackages.j… create cache folder on boot add --legacy-peer-deps (compare)
oyvindberg on master
fix assembly. meh all of this (compare)
oyvindberg on master
fix assembly. meh all of this (compare)
oyvindberg on master
Update sbt-sonatype to 3.9.13 (… (compare)
oyvindberg on master
Adjust `withRef` to take a java… (compare)
oyvindberg on master
Bloop 1.5.0, Scala 3.1.2/2.13.8… Slinky 0.7.2, Scalajs-react 2.1… Fix #431 by ignoring files and 5 more (compare)
oyvindberg on master
fix test (compare)
oyvindberg on master
Fix instructions in import-prob… (compare)
oyvindberg on master
"as" clauses in mapped types ca… TypeParamsReferencedInTree is n… Allow repeated types in tuples … (compare)
oyvindberg on master
Slinky 0.7.2, Scalajs-react 2.1… Fix #431 by ignoring files Fix #444 by handling `ForwardRe… (compare)
oyvindberg on master
Bloop 1.5.0, Scala 3.1.2/2.13.8… (compare)
oyvindberg on master
Update scalatest to 3.2.12 (#44… (compare)
oyvindberg on master
Fix #438: Instantiable23 type n… (compare)
oyvindberg on master
Update fansi to 0.3.1 (#414) (compare)
oyvindberg on fansi-0.3.1
Update fansi to 0.3.1 (compare)
oyvindberg on master
Update sbt-tpolecat to 0.3.1 (#… (compare)
[error] 2022-05-19T18:54:30.269491Z Phase3Compile.scala:147 err Compiling std (1807 Scala sources)
Compiled std (2999ms)
[E] Unexpected error when compiling std: 'class dotty.tools.dotc.core.Symbols$NoSymbol$ cannot be cast to class dotty.tools.dotc.core.Symbols$ClassSymbol (dotty.tools.dotc.core.Symbols$NoSymbol$ and dotty.tools.dotc.core.Symbols$ClassSymbol are in unnamed module of loader java.net.URLClassLoader @4451e4fe)'
[E] Failed to compile 'std'
[id => std, thread => 250, phase => build, flavour => NormalFlavour]
[warn ] 2022-05-19T18:54:30.275106Z ScalablyTypedWorkerImpl.scala:269 td 15656
Failure: You might try to set:
def scalablyTypedIgnoredLibs = Seq("std")
std: Compilation failed: Compiled std (2999ms) (/Users/simon/Code/mill-full-stack/mill-full-stack/node_modules/typescript/lib)
1 targets failed
stModule.scalablyTypedImportTask java.lang.Exception
com.github.lolgab.mill.scalablytyped.worker.ScalablyTypedWorkerImpl.scalablytypedImport(ScalablyTypedWorkerImpl.scala:296)
com.github.lolgab.mill.scalablytyped.ScalablyTyped.$anonfun$scalablyTypedImportTask$2(ScalablyTyped.scala:56)
mill.define.Task$TraverseCtx.evaluate(Task.scala:380)
scala.scalajs.js.typedarray.Uint8Array
, given that https://scalablytyped.org/docs/conversion-options#stusescalajsdom is set to true (it is by default). The few cases where you'll see usage of the other types would be in inheritance clauses, as that is a much more complicated rewrite
as
:)
as
token, and then ignore it with a warning
hello @oyvindberg , i wanted to test mui 5 components, i tried to add this block of code to build.sbt
lazy val demo =
project
.in(file("demo")).dependsOn( muiScalaJsReact)
.enablePlugins(ScalaJSBundlerPlugin)
.settings(
webpackDevServerPort := 8080,
scalaJSUseMainModuleInitializer := true,
webpackBundlingMode := BundlingMode.LibraryOnly(),
webpackDevServerExtraArgs := Seq("--inline"),
webpackConfigFile in fastOptJS := Some(
baseDirectory.value / "dev.webpack.config.js"
),
version in webpack := "4.30.0",
version in webpackCliVersion := "3.3.2",
version in startWebpackDevServer := "3.3.1",
// don't publish the demo
publish := {},
publishLocal := {},
publishArtifact := false,
Keys.`package` := file(""),
npmDevDependencies in Compile ++= Seq(
"css-loader" -> "3.4.2",
"style-loader" -> "1.1.3"
)
)
but when i run startDemo i got the error :
[error] stack trace is suppressed; run last demo / update for the full output
[error] (demo / update) sbt.librarymanagement.ResolveException: Error downloading com.olvind.st-material-ui:st-material-ui-scalajs-react_sjs1_2.12:0.1
[error] Not found
[error] Not found
[error] not found: /home/asaunix/.ivy2/local/com.olvind.st-material-ui/st-material-ui-scalajs-react_sjs1_2.12/0.1/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/olvind/st-material-ui/st-material-ui-scalajs-react_sjs1_2.12/0.1/st-material-ui-scalajs-react_sjs1_2.12-0.1.pom
[error] Total time: 2 s, completed 1 juin 2022 15:42:36
lazy val `material-ui-v5` =
project
.enablePlugins(ScalablyTypedConverterPlugin)
.configure(baseSettings, browserProject, reactNpmDeps, withCssLoading, bundlerSettings)
.settings(
useYarn := true,
webpackDevServerPort := 8018,
stFlavour := Flavour.ScalajsReact,
stReactEnableTreeShaking := Selection.All,
Compile / npmDependencies ++= Seq(
"@emotion/react" -> "11.7.1",
// "@emotion/styled" -> "11.6.0",
"@mui/material" -> "5.2.6",
"@mui/icons-material" -> "5.2.5",
"@types/react" -> "17.0.38",
"@types/react-dom" -> "17.0.11",
"@types/stylis" -> "4.0.2",
"react" -> "17.0.2",
"react-dom" -> "17.0.2",
),
libraryDependencies += "com.github.japgolly.scalajs-react" %%% "core" % "2.0.0",
libraryDependencies += "com.github.japgolly.scalajs-react" %%% "extra" % "2.0.0",
libraryDependencies += "com.olvind.st-material-ui" %%% "st-material-ui-scalajs-react" % "0.1",
)
[error] ImportTree.scala:394 message Unsupported index type TypeRef(QualifiedName(IArray(Name(<union>))),IArray(TypeRef(QualifiedName(IArray(Name(java), Name(lang), Name(String))),IArray(),NoComments), TypeRef(QualifiedName(IArray(Name(scala), Name(Double))),IArray(),NoComments)),NoComments) [thread => 259, project => material-ui-v5, ms => 89028, phase => scala.js, scope => TreeScope(TsParsedFile() / TsDeclModule(@mui/system/cssVars/cssVarsParser) / TsDeclInterface(NestedRecord) / TsMemberIndex()), id => @mui/system]com.olvind.logging.Logger$LoggedException: Unsupported index type TypeRef(QualifiedName(IArray(Name(<union>))),IArray(TypeRef(QualifiedName(IArray(Name(java), Name(lang), Name(String))),IArray(),NoComments), TypeRef(QualifiedName(IArray(Name(scala), Name(Double))),IArray(),NoComments)),NoComments)
[error] at com.olvind.logging.Logger$LoggingOps$.fatal$extension(Logger.scala:178)
[error] at org.scalablytyped.converter.internal.importer.ImportTree.tsMember(ImportTree.scala:394)
[error] at org.scalablytyped.converter.internal.importer.ImportTree.$anonfun$decl$5(ImportTree.scala:235)
[error] at org.scalablytyped.converter.internal.IArray.map(IArray.scala:491)
[error] at org.scalablytyped.converter.internal.importer.ImportTree.decl(ImportTree.scala:235)
[error] at org.scalablytyped.converter.internal.importer.ImportTree.$anonfun$container$1(ImportTree.scala:617)
[error] at org.scalablytyped.converter.internal.IArray.map(IArray.scala:491)
[error] at org.scalablytyped.converter.internal.importer.ImportTree.container(ImportTree.scala:617)
[error] References to undefined settings:
[error]
[error] material-ui-v5 / Compile / npmDevDependencies from material-ui-v5 / Compile / npmDevDependencies (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:83)
[error]
[error] material-ui-v5 / Compile / fastOptJS / startWebpackDevServer from material-ui-v5 / start (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:98)
[error]
[error] material-ui-v5 / Compile / npmDependencies from material-ui-v5 / Compile / npmDependencies (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:61)
[error]
[error] material-ui-v5 / Compile / fullOptJS / webpack from material-ui-v5 / dist (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:101)
[error]
[error] material-ui-v5 / Compile / fastOptJS / webpackExtraArgs from material-ui-v5 / Compile / fastOptJS / webpackExtraArgs (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:73)
[error]
[error] material-ui-v5 / Compile / fullOptJS / webpackDevServerExtraArgs from material-ui-v5 / Compile / fullOptJS / webpackDevServerExtraArgs (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:76)
[error]
[error] material-ui-v5 / Compile / fullOptJS / webpackExtraArgs from material-ui-v5 / Compile / fullOptJS / webpackExtraArgs (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:74)
[error]
[error] material-ui-v5 / Compile / fastOptJS / webpackDevServerExtraArgs from material-ui-v5 / Compile / fastOptJS / webpackDevServerExtraArgs (/home/asaunix/workspace/ScalaJsReactDemos-master/build.sbt:75)
[error]
[error] Use 'last' for the full log.
lazy val `material-ui-v5` =
project
.enablePlugins(ScalaJSPlugin)
// .enablePlugins(ScalablyTypedConverterPlugin)
.configure(baseSettings, browserProject, reactNpmDeps, withCssLoading, bundlerSettings)
.settings(
/* scalaVersion := "2.13.7",
scalaJSUseMainModuleInitializer := true,*/
useYarn := true,
webpackDevServerPort := 8018,
stFlavour := Flavour.ScalajsReact,
stReactEnableTreeShaking := Selection.All,
libraryDependencies += "com.github.japgolly.scalajs-react" %%% "core" % "2.0.0",
libraryDependencies += "com.github.japgolly.scalajs-react" %%% "extra" % "2.0.0",
libraryDependencies += "com.olvind.st-material-ui" %%% "st-material-ui-scalajs-react" % "0.1"
)
import typings.react.mod.useState
. with the new version of mui, i can not use import typings.react.mod.useState
since the scalablytyped plugin is disabled.
The error is reproducible with package.json
:
{
"private": true,
"license": "UNLICENSED",
"dependencies": {
"type-fest": "2.13.1",
"typescript": "4.3"
}
}
then npm install
and then cs launch stc
I will try ignoring this library in the build and see if everything still works.
Also will be happy to contribute a fix (bandaid), when I understand how to make it break in the first place :)
There we go!
Awesome, I won't create an issue then. Great work!
hello @oyvindberg , i hope ur ok, i'm finding difficulties in using the component Tabs in mui 5, i tried this without success
Tabs(activeTabId)
.withKey(key)
.className("className")
.indicatorColor(indicatorColor)
.textColor(textColor)
.centered(centered)
.onChange(onChange)
here is Tabs class :
object Tabs {
def apply(
p: /* props */ (DefaultComponentProps[
TabsTypeMap[
js.Object,
js.Function1[
/* props */ OverridePropsExtendButtonBaseTypeMapButtAbout | DefaultComponentPropsExtendButtonBaseTypAction,
Element | Null
]
]
]) with `26`
): Default[js.Object] = new Default[js.Object](js.Array(this.component, p.asInstanceOf[js.Any]))
@JSImport("@mui/material", "Tabs")
@js.native
val component: js.Object = js.native
implicit def make(companion: Tabs.type): Default[js.Object] = new Default[js.Object](js.Array(this.component, js.Dictionary.empty))()
}