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

feat, introduce "local-only" feature to keep components locally for local debugging/test purposes #9057

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

davidfirst
Copy link
Member

@davidfirst davidfirst commented Jul 22, 2024

Proposed Changes

  • mark components as local-only by bit local-only set <pattern> (undo by local-only unset, list by local-only list).
  • these local-only components are excluded from snap/tag/export commands. (unless --include-local-only was used for snap/tag).
  • all other commands work as normal for these local-only components.
  • bit status shows a new section "local only components".
  • added a new state-filter $localOnly. Can be used for all commands that support pattern.

Edit: some specs have changed in a later PR: #9059

@davidfirst davidfirst merged commit 702a0ad into master Jul 22, 2024
11 checks passed
@davidfirst davidfirst deleted the local-only-feature branch July 22, 2024 21:08
davidfirst added a commit that referenced this pull request Jul 23, 2024
…ome ids are local-only (#9059)

also, remove the --include-local-only flag.

This is related to the recently-merged local-only feature:
#9057.
The original implementation has two issues: 
1. It's possible to snap/tag local-only components with
`--include-local-only` flag. Then, the export filters them out. However,
what if it has been unset later on, snapped again and exported. The
remote doesn't have part of the history which was local-only back then.
2. when on a lane and some local-only components were snapped with the
flag above, the export sends a lane object to the remote with some
components that exist only locally.

This PR handles the issues above by the follwoing:
1. removes the `--include-local-only` flag, so it's impossible to
snap/tag local-only components.
2.  block `bit local-only set` from running on staged components.
3. just in case somehow a component was managed to be local-only when
it's staged, `bit export` blocks the export and suggests running `bit
reset` or `bit local-only unset`.
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