ScalablyTyped / Converter

Typescript to Scala.js converter
https://scalablytyped.org
GNU General Public License v3.0
218 stars 43 forks source link

Method the same after erasure #400

Closed dispalt closed 2 years ago

dispalt commented 2 years ago

Upgraded from 1.0.0-beta35 -> 1.0.0-beta37 and now I am getting these:

Looking through the release notes I'm guessing it's related to the js.Any -> Any transition.

[error] have same type after erasure: (props: Object): Unit, [Error] /home/dan/projects/core/client-comp/target/streams/_global/stImport/_global/streams/sources/a/antv__g2plot/src/main/scala/typings/antvG2plot/mod
/PercentStackedColumn.scala:10: name clash between inherited members:
[error] def createLayers(props: typings.antvG2plot.percentStackedColumnMod.PercentStackedColumnConfig with typings.antvG2plot.anon.Layers): Unit in trait BasePlot and
[error] def createLayers(props: Any): Unit in trait PercentStackedColumn
oyvindberg commented 2 years ago

Yeah, it's either that change, or #355 , if you're on scala 2.

I'll need some info for this. if you're using sbt and the plugin, run this:

sbt> debug
sbt> stImport
[debug] ScalablyTypedConverterPlugin.scala:44 input.asJson.spaces2 {
[debug]   "converterVersion" : "1.0.0-beta37",
[debug]   "conversion" : {
[debug]     "useScalaJsDomTypes" : true,
[debug]     "flavour" : "normal",
[debug]     "outputPackage" : "typings",
[debug]     "enableScalaJsDefined" : {
[debug]       "AllExcept" : {
[debug]         "values" : [
[debug]         ]
[debug]       }
[debug]     },
[debug]     "stdLibs" : [
[debug]       "dom",
[debug]       "es6"
[debug]     ],
[debug]     "expandTypeMappings" : {
[debug]       "AllExcept" : {
[debug]         "values" : [
[debug]           "prop-types",
[debug]           "react",
[debug]           "std"
[debug]         ]
[debug]       }
[debug]     },
[debug]     "ignored" : [
[debug]       "typescript"
[debug]     ],
[debug]     "versions" : {
[debug]       "scala" : "3.1.0",
[debug]       "scalaJs" : "1.8.0"
[debug]     },
[debug]     "organization" : "org.scalablytyped",
[debug]     "enableReactTreeShaking" : {
[debug]       "NoneExcept" : {
[debug]         "values" : [
[debug]         ]
[debug]       }
[debug]     },
[debug]     "enableLongApplyMethod" : false,
[debug]     "privateWithin" : null
[debug]   },
[debug]   "wantedLibs" : {
[debug]     "vue" : "2.6.11"
[debug]   }
[debug] } [project => vue, ms => 0]

Also just FYI, i downloaded the newest version of the library and it converted successfully with scala 3. for scala 2 it was caught up in an error caused by a pretty crazy inheritance hierarchy.

dispalt commented 2 years ago

Yeah I am definitely still on scala 2 and will be a for a bit. Ill get you that info shortly.

dispalt commented 2 years ago

I gave up on this library, so I guess it doesn't matter, I never used it directly.