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

Importing a dependent component overwrites its changed dependencies #1903

Closed
davidfirst opened this issue Aug 6, 2019 · 0 comments · Fixed by #1905
Closed

Importing a dependent component overwrites its changed dependencies #1903

davidfirst opened this issue Aug 6, 2019 · 0 comments · Fixed by #1905
Labels
Milestone

Comments

@davidfirst
Copy link
Member

davidfirst commented Aug 6, 2019

Describe the bug

When importing a component, Bit normally checks whether there are changes to the component and throw an error if they are.
However, when a dependency is imported to the workspace and a user is now importing its dependent it overrides the dependency although it has changed.

Steps to Reproduce

  1. create two components compA => compB, whereas compA requires compB.
  2. import compB and change it.
  3. import compA.
    Notice how compB has been overridden.

Expected Behavior

In case the dependency has changed, it should throw an error saying it can't import the component due to the change.

Also, change the error message to include a suggestion of using --merge flag, as follows:
unable to import the following components due to local changes, use --merge flag to merge your local changes or use --override flag to override them.

Specifications

  • Bit version: 14.2.3
  • Node version: Any
  • npm / yarn version: Any
  • Platform: Any
  • Bit compiler (include version): N/A
  • Bit tester (include version): N/A

CC: @itaymendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant