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

ArtefactResolution: Fix resolution of test modules #85

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

tindzk
Copy link
Owner

@tindzk tindzk commented Feb 25, 2020

ArtefactResolution: Fix resolution of test modules

When the base module's targets are overridden in the test module, the
following exception may occur during artefact resolution:

Exception in thread "main" java.util.NoSuchElementException: None.get
	at scala.None$.get(Option.scala:529)
	at scala.None$.get(Option.scala:527)
	at seed.artefact.ArtefactResolution$.$anonfun$runtimeResolution$1(ArtefactResolution.scala:388)
	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
	at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:234)
	at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:468)
	at scala.collection.TraversableLike.map(TraversableLike.scala:238)
	at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
	at scala.collection.AbstractTraversable.map(Traversable.scala:108)
	at seed.artefact.ArtefactResolution$.runtimeResolution(ArtefactResolution.scala:380)
	at seed.cli.Generate$.ui(Generate.scala:38)
	at seed.Cli$.main(Cli.scala:392)
	at seed.Cli.main(Cli.scala)

The exception only happens when the test module's targets are a subset
of the base module.

This regression was introduced in ee2e274.

When the base module's targets are overridden in the test module, the
following exception may occur during artefact resolution:

```
Exception in thread "main" java.util.NoSuchElementException: None.get
	at scala.None$.get(Option.scala:529)
	at scala.None$.get(Option.scala:527)
	at seed.artefact.ArtefactResolution$.$anonfun$runtimeResolution$1(ArtefactResolution.scala:388)
	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
	at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:234)
	at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:468)
	at scala.collection.TraversableLike.map(TraversableLike.scala:238)
	at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
	at scala.collection.AbstractTraversable.map(Traversable.scala:108)
	at seed.artefact.ArtefactResolution$.runtimeResolution(ArtefactResolution.scala:380)
	at seed.cli.Generate$.ui(Generate.scala:38)
	at seed.Cli$.main(Cli.scala:392)
	at seed.Cli.main(Cli.scala)
```

The exception only happens when the test module's targets are a subset
of the base module.

This regression was introduced in ee2e274.
@tindzk tindzk force-pushed the bug/test-module-override-targets branch from 9df18bb to 3804ee9 Compare February 25, 2020 14:50
@tindzk tindzk changed the title ArtefactResolution: Fix resolution for test modules ArtefactResolution: Fix resolution of test modules Feb 25, 2020
@tindzk tindzk merged commit 57d6422 into master Feb 25, 2020
@tindzk tindzk deleted the bug/test-module-override-targets branch February 25, 2020 15:12
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