teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.8k stars 922 forks source link

fix, avoid throwing an error not-part-of-the-lane after undo of update-dependents #9040

Closed davidfirst closed 1 month ago

davidfirst commented 1 month ago

Not easy to reproduce this bug (hence the absence of an e2e-test). Here are the general steps:

  1. comp1 -> comp2 -> comp3, tag all to main, export.
  2. create a lane from comp3 only, snap, export.
  3. on the remote, add comp2 and comp3 to update-dependents.
  4. undo comp2.
  5. import the lane to a new workspace and also comp3 with the version shows in the update-dependents prop of the lane.
  6. snap all with --unmodified.

It used to throw an error suggesting comp2 is not part of the lane. Because comp2 snap object doesn't exist locally, it can't see that the Version object has the origin with the same lane id.

This PR fixes it by not checking the dependency in the first place if it was already tagged/snapped with that dep before. We only care about newly introduced dependencies.