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

bit export <collection-name> <component-id> shows fork message #2159

Closed
odedre opened this issue Nov 25, 2019 · 3 comments · Fixed by #2591
Closed

bit export <collection-name> <component-id> shows fork message #2159

odedre opened this issue Nov 25, 2019 · 3 comments · Fixed by #2591

Comments

@odedre
Copy link
Member

odedre commented Nov 25, 2019

Describe the bug

imported my component , made modifications and tried to export back to the same collection with the following command bit export bitsrc.billing configs/bluesnap-plans --eject.
I got the following message:

bit is about to fork the following components and export them to bitsrc.billing.
configs/bluesnap-plans
also, if they're staged, bit will not change their status to exported unless '--set-current-scope' flag is used.

there are additional flags for the 'export' command to specifically handle forking components:

  1. '--include-dependencies' exports all dependencies to the destination alongside the component.
  2. '--set-current-scope' sets your workspace to use the destination scope as the main remote for the component.
  3. '--rewire' changes all dependencies to point to the new destination.

Expected Behavior

the component should not be forked to a different collection I am exporting to the original collection.

Screenshots, exceptions and logs

Screen Shot 2019-11-25 at 1 11 13 PM

Specifications

  • Bit version: 14.4.3
@odedre odedre assigned odedre and GiladShoham and unassigned odedre Nov 25, 2019
@GiladShoham GiladShoham added this to the 14.6.0 milestone Nov 25, 2019
@KutnerUri
Copy link
Contributor

KutnerUri commented Dec 5, 2019

I also got this warning.
It seems bit export does not remember remote scope when using local name.

Screen Shot 2019-12-05 at 17 31 14

using the full name works.

bit export bit.javascript bit.javascript/template/react-native

but seems a little redundant.

Bonus

can you add the original scope?

bit is about to fork...
    template/react-native (was template/react-native)

(or in any other template)

@GiladShoham
Copy link
Member

@KutnerUri Thanks for reporting this, we will address it soon.

@GiladShoham GiladShoham modified the milestones: 14.6.0, 14.7.0 Dec 8, 2019
@GiladShoham GiladShoham modified the milestones: 14.7.0, 14.8.0 Dec 30, 2019
@davidfirst
Copy link
Member

I found the issue.
This is happening when specifying an id without scope-name.
Due to a bug with scope.getParsedId, the id was parsed incorrectly. e.g. for a name "bar/foo", it was parsed as: { scope: "bar", name: "foo" }, instead of { scope: null, name: "bar/foo" }. When trying to export to a different scope than the original one, Bit prompts with the fork message.
This has been fixed in this PR: #2591.

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

Successfully merging a pull request may close this issue.

4 participants