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: add lib.install command #4953

Merged
merged 3 commits into from
May 16, 2024
Merged

feat: add lib.install command #4953

merged 3 commits into from
May 16, 2024

Conversation

mitchellwrosen
Copy link
Member

@mitchellwrosen mitchellwrosen commented May 15, 2024

Overview

install

Edit: the help now looks like this

2024-05-15-212736_1281x293_scrot

This PR adds a lib.install (alias: install.lib) command to replace pull for installing a dependency into lib.

It's different than pull in a couple ways:

  • You don't provide a local name for the dependency; pull @unison/base/releases/4.0.0 lib.base_4_0_0 just becomes lib.install @unison/base/releases/4.0.0, and the name is picked automatically (see screenshot).
  • Because the name is picked manually, it always installs into an empty namespace. So, there's never a merge.

Test coverage

I tested this manually

@mitchellwrosen mitchellwrosen marked this pull request as ready for review May 16, 2024 01:23
import Unison.Codebase.Editor.Git (withStatus)
import Unison.Codebase.Editor.Git qualified as Git
import Unison.Codebase.Editor.RemoteRepo (ReadGitRemoteNamespace)
import Unison.Codebase.GitError qualified as GitError
import Unison.Codebase.Path
import Unison.Codebase.Path qualified as Path
import Unison.Codebase.SqliteCodebase.Conversions qualified as Cv
import Unison.Codebase.SqliteCodebase.Operations qualified as SqliteCodebase.Operations
import Unison.Codebase.SyncMode (SyncMode)
import Unison.Codebase.Type
( Codebase (..),
GitError (GitCodebaseError),
PushGitBranchOpts (..),
SyncToDir,
)
import Unison.Codebase.Type (Codebase (..), GitError)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a high level description to the PR about what is happening with these

Copy link
Contributor

@aryairani aryairani May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I guess I found it in the commit message, or is there more to it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SyncMode argument was totally ignored, so debug.pull-exhaustive didn't do anything special.

Copy link
Contributor

@aryairani aryairani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome!

@aryairani aryairani merged commit b19d41a into trunk May 16, 2024
19 checks passed
@aryairani aryairani deleted the 24-05-15-install-command branch May 16, 2024 10:19
@hojberg
Copy link
Member

hojberg commented May 16, 2024

@mitchellwrosen @aryairani

I'm getting a PR going for share to update the install modals to this new command 🎉.
Let's coordinate when we cut a new UCM release.

@aryairani
Copy link
Contributor

@hojberg

I'm getting a PR going for share to update the install modals to this new command 🎉.

Let's coordinate when we cut a new UCM release.

Thank you!

@hojberg
Copy link
Member

hojberg commented May 16, 2024

Here's the PR: unisoncomputing/share-ui#6

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.

None yet

3 participants