Ensure Yarn Workspace adapter supports ember try:reset
.
#467
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.
Fundamentally,
Adapter.prototype.cleanup
cannot requireAdatper.prototype.setup
to have been called. Most of the time.setup
is called before.cleanup
(this happens withember try:each
andember try:one
), but when--skip-cleanup
is specified (e.g.ember try:one scenario-name --skip-cleanup
) and you subsequently runember try:reset
the.setup
happened in a completely different process.The issue here is a misunderstanding when we added the
WorkspaceAdapter
initially. Basically, the assumtion was that.setup
was for setting up both local instance state (e.g. thethis._packageAdapters
array) and for actually preparing for aember try:...
run (doing backups / etc).The fix is to move the internal state setup code directly into
init
/constructor, and ensure that
.setup` is only used to create the backups themselves.Fixes #466