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

Ensure Yarn Workspace adapter supports ember try:reset. #467

Merged
merged 1 commit into from Mar 13, 2020

Commits on Mar 12, 2020

  1. Ensure Yarn Workspace adapter supports ember try:reset.

    Fundamentally, `Adapter.prototype.cleanup` **cannot** require
    `Adatper.prototype.setup` to have been called. _Most_ of the time
    `.setup` is called before `.cleanup` (this happens with `ember try:each`
    and `ember try:one`), but when `--skip-cleanup` is specified (e.g.
    `ember try:one scenario-name --skip-cleanup`) and you subsequently run
    `ember 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. the
    `this._packageAdapters` array) **and** for actually preparing for a
    `ember 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.
    rwjblue committed Mar 12, 2020
    Configuration menu
    Copy the full SHA
    7648b01 View commit details
    Browse the repository at this point in the history