-
Notifications
You must be signed in to change notification settings - Fork 47
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
Max parameters exceeded (and other strange things) #588
Comments
Hey there So yeah, a bunch of things here. too many parametersThe error you're seeing is that the react component identification code mistakenly identifies some code as react components, for instance the The type which is taken to be the type of props has more than 254 required members, so that's where Scala.js starts to complain when they are all put into the I think I'll hack around it and say if a component has more than X required members, where X is above say 50, we drop it. nobody is gonna supply more than 50 required props anyway. anon
Whether it's a package or an object depends on the number of classes inside it. It may sound ridiculous for this to flip-flop like this, but it's a compromise between git (which likes fewer files) and intellij (which does not like scala files with thousands of lines of code) There are some details surrounding this, where a given anonymous type may be imported from a dependency, and the scala anon class ends up in that library instead and the downstream library will refer to it by that name. I suppose this can explain what you're seeing with anon package appearing and disappearing if you're seeing A final thing here is a suggestion to only use ST not picking up changes.Might it be that ST is not picking up changes in if you see any other changes not being picked up by ST I'd love some details, as that would be a very irritating bug. you should not have to delete those files ever. |
FWIW I simplified the build a bit:
ran
as well to dramatically reduce the amount of code |
Reproduction: https://github.com/steinybot/bug-reports/tree/scalablytyped/max-parameters-exceeded
NOTE: This is using the changes in #586
Trying to import and compile this:
Fails with:
There are also some other weird things going on here which could be related to #586, I'm not too sure.
If we do not ignore
"@ant-design/cssinjs"
then there is a duplicateanon
package.What is really strange is that excluding the dev dependency on
"@types/react" -> "18.2.13"
also leads to this duplicateanon
package. Why would having fewer dependencies have more packages?Also if we do not ignore
"csstype"
then we get three fewer properties and we do not exceed the parameter limit. This is also very odd. Why does ignoring it lead to more properties?Sometimes to pickup the changes we have to bust the cache manually:
The text was updated successfully, but these errors were encountered: