Resolve umbrella project bugs #16
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR aims to fix two related bugs that crop up when using this application in an umbrella project.
Exposureevaluates test paths at compile time in order to ensure thatMixis available (since test paths are configured in the mix project config). The issue here is that, in umbrella projects, tests are run in the context of the child application BUT dependencies are compiled in the context of the mix project. So, during compilation, the umbrella project test paths would be baked into the library (usually just the default["test"]) and the children would run their tests using those test paths. In many cases, this worked fine because, let's face it, most people aren't configuring custom test paths. However, if two children applications had different test paths, this would cause an issue.Additionally, using
:persistent_termto cache the test paths was also inherently flawed because it was explicitly making the assumption that test paths must be the same between children applications (by nature of the key it was using).Approach
This PR resolves the issue by:
:persistent_termkey to ensure no conflict between children applicationsThese changes both leverage
Mixat runtime, but that isn't an issue becauseMixis guaranteed to be available by nature of the fact that this library is used exclusively through the context of a mix task.Testing
This PR relies on the existing test suite to ensure no breaking changes. anecdotally, these changes were also tested on a personal umbrella project.