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

ppm install doesn't install from commit hashes #821

Open
5 tasks done
alejandrosame opened this issue Dec 4, 2023 · 3 comments
Open
5 tasks done

ppm install doesn't install from commit hashes #821

alejandrosame opened this issue Dec 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@alejandrosame
Copy link

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

Running

ppm install https://github.com/tidalcycles/pulsar-tidalcycles.git -b 207bb39e4c7e1789582cf35550002befee10b83b

yields the following output

Cloning https://github.com/tidalcycles/pulsar-tidalcycles.git ✓
Can't find the branch, tag, or commit referenced by 207bb39e4c7e1789582cf35550002befee10b83b

Pulsar version

1.109.0 and 1.111.0

Which OS does this happen on?

❓ Other(Please specify in the OS details field below)

OS details

NixOS 23.11

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

After installing Pulsar, execute

ppm install https://github.com/tidalcycles/pulsar-tidalcycles.git -b 207bb39e4c7e1789582cf35550002befee10b83b

Additional Information:

No response

@alejandrosame alejandrosame added the bug Something isn't working label Dec 4, 2023
@DeeDeeG
Copy link
Member

DeeDeeG commented Dec 8, 2023

I think this is a limitation of the underlying git-utils library that we are using to interact with repositories.

There is a method to check out "references" such as HEADs (branches) or tags, but not for arbitrary commits. See: https://github.com/atom/git-utils#repositorycheckoutreferencereference-create.

I think the usage info for the -b/-t tags of ppm install must have been written while the implementation was still being explored, whereas I don't think checking out individual commits was actually gotten working at the time.

See also the PR where this functionality was originally implemented: pulsar-edit/ppm#13. It only really mentions tags and branches in the PR body/title, not commits. I do think stating it could check out a specific commit by its SHA was an oversight/error.

So, I think we do need to update the usage/help text to only state that it works for branches/tags, not commit SHAs.

(Otherwise, if anyone is up for implementing this, we may be able to accept an improvement to a forked git-utils to support checking out arbitrary commits, presumably in the --detached state.)

@DeeDeeG
Copy link
Member

DeeDeeG commented Dec 13, 2023

We at least have a PR to address the usage/help text of the -t/-b flags for package installation, as well as the corresponding error message when usage of those flags fails, so they don't claim installing from a commit hash works. (It will not work at the moment, unfortunately.)

PR to fix the usage/help text and error message: pulsar-edit/ppm#105

@alejandrosame
Copy link
Author

Thanks!

I might look into contributing commit checkouts soon, since it will help my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants