Skip to content
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

BuildConfig: Detect invalid references on platform modules #86

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

tindzk
Copy link
Owner

@tindzk tindzk commented Feb 25, 2020

Invalid module references currently cause an exception during artefact
resolution:

Exception in thread "main" java.util.NoSuchElementException: key not found: invalid-module
	at scala.collection.immutable.Map$Map2.apply(Map.scala:129)
	at seed.config.BuildConfig$.$anonfun$collectJsModuleDeps$1(BuildConfig.scala:541)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.config.BuildConfig$.collectJsModuleDeps(BuildConfig.scala:539)
	at seed.config.BuildConfig$.collectModuleDepsBase(BuildConfig.scala:587)
	at seed.config.BuildConfig$.$anonfun$collectModuleDeps$2(BuildConfig.scala:599)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.config.BuildConfig$.collectModuleDeps(BuildConfig.scala:599)
	at seed.artefact.ArtefactResolution$.allRuntimeLibs(ArtefactResolution.scala:225)
	at seed.artefact.ArtefactResolution$.$anonfun$allRuntimeLibs$8(ArtefactResolution.scala:247)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.artefact.ArtefactResolution$.allRuntimeLibs(ArtefactResolution.scala:244)
	at seed.artefact.ArtefactResolution$.runtimeResolution(ArtefactResolution.scala:379)
	at seed.cli.Generate$.ui(Generate.scala:38)
	at seed.Cli$.main(Cli.scala:394)
	at seed.Cli.main(Cli.scala)

The fix is to include all platform modules in the detection logic.

Invalid module references currently cause an exception during artefact
resolution:

```
Exception in thread "main" java.util.NoSuchElementException: key not found: invalid-module
	at scala.collection.immutable.Map$Map2.apply(Map.scala:129)
	at seed.config.BuildConfig$.$anonfun$collectJsModuleDeps$1(BuildConfig.scala:541)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.config.BuildConfig$.collectJsModuleDeps(BuildConfig.scala:539)
	at seed.config.BuildConfig$.collectModuleDepsBase(BuildConfig.scala:587)
	at seed.config.BuildConfig$.$anonfun$collectModuleDeps$2(BuildConfig.scala:599)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.config.BuildConfig$.collectModuleDeps(BuildConfig.scala:599)
	at seed.artefact.ArtefactResolution$.allRuntimeLibs(ArtefactResolution.scala:225)
	at seed.artefact.ArtefactResolution$.$anonfun$allRuntimeLibs$8(ArtefactResolution.scala:247)
	at scala.collection.immutable.List.flatMap(List.scala:335)
	at seed.artefact.ArtefactResolution$.allRuntimeLibs(ArtefactResolution.scala:244)
	at seed.artefact.ArtefactResolution$.runtimeResolution(ArtefactResolution.scala:379)
	at seed.cli.Generate$.ui(Generate.scala:38)
	at seed.Cli$.main(Cli.scala:394)
	at seed.Cli.main(Cli.scala)
```

The fix is to include all platform modules in the detection logic.
@tindzk tindzk merged commit 753c372 into master Feb 25, 2020
@tindzk tindzk deleted the bug/invalid-module-refs branch February 25, 2020 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant