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

unable to re-export after deleting the components from the remote #2341

Closed
davidfirst opened this issue Feb 13, 2020 · 2 comments
Closed

unable to re-export after deleting the components from the remote #2341

davidfirst opened this issue Feb 13, 2020 · 2 comments
Assignees
Labels

Comments

@davidfirst
Copy link
Member

davidfirst commented Feb 13, 2020

Describe the bug

If I recreated my remote collection or removed my remote components but left them locally, then trying to re-export them, here is what happens:

  1. bit export <my-remote> => returns "nothing to export".
  2. bit export <my-remote> <glob> => returns "nothing to export".
  3. bit export <my-remote> <id> => returns "component X has been already exported to Y".
  4. bit export <my-remote> <glob> --all => returns "error: component X was not found.".
  5. bit export <my-remote> <glob> --all --all-versions => succeeded!

Steps to Reproduce

  1. create and export a component.
  2. delete the remote component.
  3. export the component using bit export <remote>

Expected Behavior

Currently, to bypass this issue, you have to run bit export <remote> <component-id-or-glob> --all versions --all.
the --all-versions flag makes sure to export non-staged versions.
the --all flag makes sure to export non-staged components.
this is not trivial.

I suggest the following:

  1. when using --all, it'll enable --all-versions flag.
  2. when using --all-versions, it'll enable --all flag.
  3. maybe renaming the --all to --include-non-staged? Tallyb , itaymendel .
  4. when not using any flag. along with "nothing to export", we can suggest the user using --all flag. Tallyb , itaymendel
  5. when exporting one component and it's exported already, it should allow it to be re-exported, same as when using a wildcard.

Screenshots, exceptions and logs

If applicable, add screenshots, exceptions, and logs to help explain your problem.

Specifications

  • Bit version: 14.7.4
@Tallyb
Copy link
Contributor

Tallyb commented Feb 13, 2020

I am not sure I follow:

  1. --all refer to components, i.e. it will export ALL the components in the workspace, including ones that are not in stages.
  2. --all-versions is per component, i.e. for each component export all of its versions, and not just the ones that are not staged.
    Potentially, the -all-versions can be renamed to --full.
    I would not change the defaults on behavior.
  3. sounds good: "Use --all to export components that were previously exported".

davidfirst added a commit that referenced this issue Feb 13, 2020
…sed and vice versa, to enable re-exporting a component after deleting it
davidfirst added a commit that referenced this issue Feb 14, 2020
…sed and vice versa, to enable re-exporting a component after deleting it (#2345)
@davidfirst
Copy link
Member Author

Thanks @Tallyb .
For the most part, what you've written is correct. Only the --all flag doesn't necessarily mean all components. I can use it with ids and it'll export only these ids.

davidfirst added a commit that referenced this issue Feb 17, 2020
* fix #2211 and #2308, when exporting to multiple scopes, make sure to not export their dependencies when these dependencies themselves are not export pending (#2309)

* bump dev version

* resolve #2268, prevent logger from holding the terminal once a command is completed by adding an error handler. Also, changed some "logger.debug" to "logger.silly". Also, support configuring the logger level by running "bit config set log_level <level>". Also, limit the number of concurrent files write to 100 (#2310)

* fix typo in the BitId README

* fix "bit status" and "bit tag" when new components require each other by module paths (#2313)

* Fix e2e-tests to avoid code execution inside "describe" blocks (#2329)

* move all Helper instantiation from describe to before.
* fix defaultScope tests, remove code that was entered by mistake in the describe block to before block.
* delete javascript-hook.e2e file, the tests there were written long ago, marked as "skip" and not relevant anymore.

* support import/require statements of module paths when it has no scope-name (e.g. "@bit/button") (#2331)

* resolve part of #2341, enable "--all" flag when "--all-versions" is used and vice versa, to enable re-exporting a component after deleting it (#2345)

* Fixed broken link leading to quick start guide (#2338)

* fix dynamic dist reference from package.json (#1808) when isolating via capsule (#2348)

* remove .only from extension tests

Co-authored-by: Erik <arebokert@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants