Skip to content

fix (309): check that used starts with listed version#315

Merged
MordechaiHadad merged 1 commit into
MordechaiHadad:masterfrom
antoineeestevaaan:fix-bob-list
Sep 9, 2025
Merged

fix (309): check that used starts with listed version#315
MordechaiHadad merged 1 commit into
MordechaiHadad:masterfrom
antoineeestevaaan:fix-bob-list

Conversation

@antoineeestevaaan

@antoineeestevaaan antoineeestevaaan commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

with this PR, when listing currently installed versions, let's call one of them v,
bob list will check whether or not the currently "used" version starts with v
instead of is strictly equal to v.

Note

this is the new version of the PR, after review from @MordechaiHadad

Pros:

Cons:

  • i do not think there really are downsides to this new version !

Comparison

  • before
┌───────────┬─────────────┐
│  Version  │  Status     │
├───────────┼─────────────┤
│  v0.11.3  │  Installed  │
│  68eece8  │  Installed  │
└───────────┴─────────────┘
  • after
┌───────────┬─────────────┐
│  Version  │  Status     │
├───────────┼─────────────┤
│  v0.11.3  │  Installed  │
│  68eece8  │  Used       │
└───────────┴─────────────┘

Changelog

  • check that value (used) starts with version

@MordechaiHadad

Copy link
Copy Markdown
Owner

Hello please rebase your current codebase to the updated codebase as a lot of regex has been modified. Secondly lets modify this implementation of yours a little bit.

There is only one time when the full hash is required and it is when fetching the commit from remote.

What we should do instead is as follows, generally prefer the shortened hash (i think it is trimmed to like 7 characters) for everything, but when building from source explicitly ask for the full hash.

@antoineeestevaaan

Copy link
Copy Markdown
Contributor Author

hi !

yup, i've seen the other PR getting merged :)

the 2 commits from my PR have been successfully rebased without any conflict.

as for your requests, that makes sense => i'll switch to short hashes then ;)

@antoineeestevaaan

antoineeestevaaan commented Aug 22, 2025

Copy link
Copy Markdown
Contributor Author

@MordechaiHadad, could you assign me to this PR, so that i can see the status changes with gh status (i'm working on a TTY-based workflow on my Raspberry Pi for fun !)

@MrDwarf7

Copy link
Copy Markdown
Contributor

@antoineeestevaaan - A fellow terminal-only enjoyer; clearly 😄 . You should be able to watch PR check runs via gh pr checks --watch N (315 - N would be the PR number for whatever you're after).

I may perhaps be able to assist after working on/around the hash stuff in the last PR (Though not too extensively).
Given the amount of semantic meaning that some of the fields for the ParsedVersion have (tag_name & others like target_commitish); perhaps it would be worth moving them to smaller struct(s) and implementing FromStr/From.
Would make validation easier once it's got its own type (instead of stringly checking), then only leaves the more open-ended one for heavy checking and parsing paths.

Perhaps @MordechaiHadad you can weigh in on where/how the split between ParsedVersion and UpstreamVersion happens and if it would be worth simply consolidating under an enum or tuple struct with trait impl's to act as guide/states for data flow?

@MordechaiHadad

Copy link
Copy Markdown
Owner

Ill read this tomorrow sorry, i was away on shabat.

@antoineeestevaaan antoineeestevaaan changed the title fix (309): expand all Git commits fix (309): check that used starts with listed version Aug 24, 2025
@antoineeestevaaan

Copy link
Copy Markdown
Contributor Author

@MordechaiHadad, just updated the PR !

mostly reverted all of it xD
then the patch is really simple !

please tell me if you like it more ;)

@MordechaiHadad

Copy link
Copy Markdown
Owner

Hmm 5 commits but only 1 line of code changed? lol

@antoineeestevaaan

antoineeestevaaan commented Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

these can be squashed if you want.

do i need to change something else?

@MordechaiHadad

Copy link
Copy Markdown
Owner

these can be squashed if you want.

do i need to change something else?

Yeah nothing else, but squashing. This is just to handle hashes in the ls command correct?

@antoineeestevaaan

Copy link
Copy Markdown
Contributor Author

Yeah nothing else, but squashing.

roger that, i'll do that soon.

This is just to handle hashes in the ls command correct?

yes, this PR only changes the bob ls command by less strictly checking the currently used version.

@MordechaiHadad

Copy link
Copy Markdown
Owner

Alright waiting for squashing and then ill merge

@antoineeestevaaan

Copy link
Copy Markdown
Contributor Author

@MordechaiHadad, i think this is good to go 😉

@MordechaiHadad MordechaiHadad merged commit b29e161 into MordechaiHadad:master Sep 9, 2025
2 checks passed
@antoineeestevaaan antoineeestevaaan deleted the fix-bob-list branch September 9, 2025 08:51
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.

3 participants