Skip to content

Remove setup of __ScalaJSEnv.javaSystemProperties from the sbt plugin #3295

@gzm0

Description

@gzm0

Was: Proposal: Make __ScalaJSEnv.javaSystemProperties the responsibility of the JSEnv (changed after #3295 (comment))

Currently we fully manage Java System Property injection in the sbt plugin. As a result, we need to understand details about the underlying module structure.

Further, note that many JSEnvs further inject information into __ScalaJSEnv (source mapper, exit function). I propose that we make __ScalaJSEnv generation and injection fully the responsibility of a JSEnv by adding javaSystemProperties: Map[String, String] (additionalJavaSystemProperties?) to the RunConfig (after #3255).

As a result

  • __ScalaJSEnv becomes the sole responsibility of the JSEnv and hence can be better isolated.
  • The sbt plugin does not need to know about module loading details anymore.
  • JSEnvs can easily add information about themselves to javaSystemProperties if they so desire.

This, together with #3294 would allow us to remove jsExecutionFiles and call it jsInput. As a result, our core supporting infrastructure would be completely agnostic of the JS module type.

Metadata

Metadata

Assignees

Labels

enhancementFeature request (that does not concern language semantics, see "language")

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions