
- #SCALA NOT ENOUGH ARGUMENTS FOR METHOD MAP CODE#
- #SCALA NOT ENOUGH ARGUMENTS FOR METHOD MAP DOWNLOAD#
In the example above, this would generate: FewestModulesĬreate as few modules as possible without including unnecessary code. There are currently two module split styles: FewestModules and SmallestModules. You can change it as follows: import .ModuleSplitStyle scalaJSLinkerConfig ~= ( _.
#SCALA NOT ENOUGH ARGUMENTS FOR METHOD MAP CODE#
The linker generates internal modules automatically based on the dependency graph of the code and moduleSplitStyle. Unlike public modules, internal modules may not be imported by user code.ĭoing so is undefined behavior and subject to change at any time. So far, we have seen how public modules can be configured.īased on the public modules, the Scala.js linker generates internal modules for the shared code between the public modules. Note that there is no public module main.js, because there is no entry point using the default moduleID. This would generate two public modules a.js / b.js.Ī.js will export a method named start that calls AppA.a.ī.js will export a method named start that calls AppB.b.įurther, importing b.js will call AppB.main. ( name = "startAdmin", moduleID = "admin" ) def startAdmin () : Unit = ? import .ModuleInitializer scalaJSModuleInitializers in Compile += Set the moduleID for your top-level exports and/or module initializers explicitly (a module initializer is basically a main method for the module). You can then create different entry points and/or generate as many small modules as possible using the following setups. The outputs of those commands will be in a subdirectory like project/target/scala-2.13/project-fastopt/, instead of as a single file. Module splitting Quickstartįirst, instead of fastOptJS / fullOptJS, use fastLinkJS / fullLinkJS. It might cause compilation errors in some rare cases due to type inference, or if you declare a subclass of js.Promise. This is unlikely to cause any issue in most cases, since js.Promise extends js.Thenable. The result type of js.Promise.then was changed from js.Thenable to js.Promise. Known source breaking changes js.Promise.then It is not entirely backward source compatible: it is not guaranteed that a codebase will compile as is when upgrading from 1.2.x (in particular in the presence of -Xfatal-warnings).Īs a reminder, libraries compiled with 0.6.x cannot be used with Scala.js 1.x they must be republished with 1.x first.It is not forward binary compatible with 1.2.x: libraries compiled with 1.3.0 cannot be used with 1.2.x or earlier.

It is backward binary compatible with all earlier versions in the 1.x series: libraries compiled with 1.0.x through 1.2.x can be used with 1.3.0 without change.If upgrading from Scala.js 0.6.x, make sure to read the release notes of Scala.js 1.0.0 first, as they contain a host of important information, including breaking changes.

If you need help with anything related to Scala.js, you may find our community on Gitter and on Stack Overflow.īug reports can be filed on GitHub. If you are new to Scala.js, head over to the tutorial. In addition, this release contains a number of new methods and classes in the JDK implementation, among which the higher-order methods of the java.util collections, and the locale-sensitive overloads of String.toLowerCase, toUpperCase and format.
#SCALA NOT ENOUGH ARGUMENTS FOR METHOD MAP DOWNLOAD#
js file into multiple modules, to optimize download size in multi-page applications or speed up incremental bundling.

It is now possible to split the generated. This release brings one of the most awaited features for Scala.js: module splitting support! We are excited to announce the release of Scala.js 1.3.0!
