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

improve an error when snapping/tagging a dependency from another lane to suggest solutions #7728

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scopes/component/snapping/snapping.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,9 @@ there are matching among unmodified components thought. consider using --unmodif
if (!isPartOfHistory) {
const laneOrMainStr = lane ? `current lane "${lane.name}"` : 'main';
throw new Error(
`unable to tag/snap ${component.id.toString()}, it has a dependency ${dep.id.toString()} which is not part of ${laneOrMainStr} history.`
`unable to tag/snap ${component.id.toString()}, it has a dependency ${dep.id.toString()} which is not part of ${laneOrMainStr} history.
one option to resolve this is installing ${dep.id.toStringWithoutVersion()} via "bit install", which installs the version from main.
another option, in case this dependency is not in main yet is to remove all references of this dependency in the code and then tag/snap.`
);
}
})
Expand Down