Skip to content

Conversation

@davidfirst
Copy link
Member

Problem

When merging main into a lane in bare scope, dependencies in snapped components were not updated correctly:

  • Diverged components (being snapped) had dependencies pointing to old lane versions instead of newly merged versions
  • Dependency versions were stored as hashes instead of tags when tags were available

Solution

Updated snapFromScope to populate snapData.dependencies for components being snapped during lane merge, similar to how updateDependents works.

The fix:

  • Updates dependencies to point to newly merged versions (not old lane versions)
  • Converts hashes to tags using the Component object's tags collection
  • Only processes components being snapped (efficient)
  • Reuses existing snapData.dependencies mechanism

Example

Before:

comp1 dependencies: comp2@eca78007... (old lane snap hash)

After:

comp1 dependencies: [email protected] (merged version as tag)

Changes

  • scopes/component/snapping/snapping.main.runtime.ts: Added logic to update dependencies for merged components
  • scopes/component/merging/merging.main.runtime.ts: Removed hash-to-tag conversion logic (now handled in snapFromScope)

…ane merge

When merging main into a lane in bare scope, components being snapped had
dependencies pointing to old lane versions instead of newly merged versions.
This occurred when diverged components (being snapped) had dependencies on
non-diverged components (simply updated).

The fix populates snapData.dependencies in snapFromScope, similar to how
updateDependents works, and converts hashes to tags using the Component
object's tags collection for efficiency.
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.

2 participants