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

kup install k --version ... does not work #2938

Closed
ehildenb opened this issue Sep 30, 2022 · 11 comments
Closed

kup install k --version ... does not work #2938

ehildenb opened this issue Sep 30, 2022 · 11 comments

Comments

@ehildenb
Copy link
Member

I have kup installed, and I tried to install a specific version of K:

% kup install k --version 5.4.11
❗ The package 'k' is already installed. Use 'kup update k' to update to the latest version.

% kompile --version
K version:    5.4.9
Build date:   Fri Sep 30 03:35:52 UTC 2022

So it's not installing the specific version I want, but staying on the prior version.

@goodlyrottenapple
Copy link
Contributor

kup expected the following command for updating already installed packages:

kup update k --version ...

Also note that the version argument has to either be a git commit hash or the tag, so in this instance,

kup update k --version v5.4.11

@ehildenb
Copy link
Member Author

ehildenb commented Oct 3, 2022

How can I see the acceptable version tags? Can kup script pull them down? kup list k --versions or kup list k --all or something?

Or kup version k --all?

@goodlyrottenapple
Copy link
Contributor

goodlyrottenapple commented Oct 3, 2022

I have been thinking about this. github does have some APIs which do not require auth tokens, so we could potentially add a call to list the versions. however, we will probably have to manually hard-code the commit past which no nix flake exists and therefore cannot be installed via kup

@goodlyrottenapple
Copy link
Contributor

I've started working on a kup list <package> command. The current output is:

kup list k
┌─────────────────────────┬──────────────────────────────────────────┐
│ Version                 │ Commit                                   │
├─────────────────────────┼──────────────────────────────────────────┤
│ vsc                     │ b1e46e5f80a5a289ec3520fc79d545eb9ce50cac │
│ v5.4.13                 │ ce15cf3dd86057a8755b0a562adaec6e85f0cc53 │
│ v5.4.12                 │ 4ba5f845950b74a84376e3639796c6a0b3dc6c2b │
│ v5.4.11                 │ 155d7aaa7fe68b51b290d45d2ea4bf21ead34f77 │
│ v5.4.9_6009803          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9_6664c36          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9_9f46a0a          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9_6f2eea1          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9_3b44282          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9                  │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9__testing_082689e │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9__testing_        │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9__testing         │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.9_fb67fb0          │ 5f5e2fe94e1182dbae5a49466f10dc5bf9e6cc41 │
│ v5.4.8                  │ b6b706745091d136492400196ffa1e63ca9d7ba5 │
│ v5.4.7                  │ 0b0189cc60c10d867a0e7b95432236df34eb6a1a │
│ v5.4.6                  │ 9178b8bd09fd8e14d56282bd7fec665ee4e7030e │
│ v5.4.5                  │ 09c3aa9cafc656cb608a3b8a0f6fbedb1b55451a │
│ v5.4.4                  │ 7ab336f80e64ee934279462cc60da056318609a3 │
│ v5.4.3                  │ 036f07dc58121f0f4a70aa6dd1481adbb0547144 │
│ v5.4.2                  │ 054192604f493afcf724d61e1bbfa5109b25abff │
│ v5.4.1                  │ b309ade9581e72d1c942df69d2af105b038175eb │
│ v5.4.0                  │ 11e07b4fa257b3a448ec61bc091be6bb67622e2b │
│ v5.3.205                │ 59e6eb73a9c2578070f8a85b28e6f1c3653a7aeb │
│ v5.3.204                │ 01c7620ab4ca7aada8d91eb1bdc16432e5f3d82e │
│ v5.3.203                │ 168c00be87d3f58291cde823fc95cea0e4d79e3a │
│ v5.3.202                │ 34ed1b71a6828a0b05db85df1cd5860eb6738e59 │
│ v5.3.201                │ 1eaaae3a1ab3558da5a8822a3894ddf370c35cb5 │
│ v5.3.200                │ 7d65c3305bb9211c73db69100b8102c379751791 │
│ v5.3.199                │ e01f9ad75d7f7bc2c6650ee7a2918b1ec8cd1410 │
└─────────────────────────┴──────────────────────────────────────────┘

I was thinking of adding the commit hash and along with the messages and dates to this table? Also, some repos may not have tagged releases, so this table would show all commits and leave the tag name blank for non-tagged, and then have kup list k --tags-only to only show major/tagged releases...

@ehildenb
Copy link
Member Author

ehildenb commented Oct 3, 2022

I would do a short commit hash, instead of long (8 characters at most).

And then have a third column with the commit title, that sounds good yes.

But it would be good if it was the title of the commit which was done by computing git merge-base $(git rev-parse origin/develop) ${TAG_ID}, instead of just ${TAG_ID} commit. Because the ${TAG_ID} commit will just be "Set version ${TAG_ID}`.

@goodlyrottenapple
Copy link
Contributor

not sure how to get that info via the github api

@goodlyrottenapple
Copy link
Contributor

this is how it looks now for k:

┌────────────────┬─────────┬────────────────────────────────────────────────────┐
│ Version        │ Commit  │ Message                                            │
├────────────────┼─────────┼────────────────────────────────────────────────────┤
│ v5.4.15        │ e902b01 │ Set Version: 5.4.15                                │
│                │ decbb7d │ Merge remote-tracking branch 'origin/develop'      │
│                │ dbd16ba │ Add M1 mac to CI (#2924) * Set Version 5.4.8 *...  │
│ v5.4.14        │ 22a35a7 │ Set Version: 5.4.14                                │
│                │ e83c6b6 │ Merge remote-tracking branch 'origin/develop'      │
│                │ 6bcfe26 │ Updated CACHIX Variable to use secrets (#2942)     │
│                │ ab925f8 │ Set Version: 5.4.13                                │
│                │ b89a431 │ Merge remote-tracking branch 'origin/develop'      │
│                │ 7a860cf │ Update dependency: haskell-...                     │
│ v5.4.13        │ ce15cf3 │ Set Version: 5.4.13                                │
│                │ 1fc0217 │ Merge remote-tracking branch 'origin/develop'      │
│                │ f233598 │ add log hook to K-IO module (#2919) Co-...         │
│ v5.4.12        │ 4ba5f84 │ Set Version: 5.4.12                                │
│                │ 4c4745a │ Merge remote-tracking branch 'origin/develop'      │
│                │ 6598a15 │ Hotfix for release branch (#2937)                  │
│ v5.4.11        │ 155d7aa │ Set Version: 5.4.11                                │
│                │ f2612f8 │ Merge remote-tracking branch 'origin/develop'      │
│                │ 14a972c │ Err on simp rule even in kompile (#2905) Fixes:... │
│                │ caae44a │ Set Version: 5.4.10                                │
│                │ a133c1e │ Merge remote-tracking branch 'origin/develop'      │
│                │ 2b0217e │ package/version: fix variable name (#2933) Co-...  │
│                │ e11d7df │ Added /install script to website (#2932) *...      │
│                │ 7ad311f │ Documentation Overhaul (#2929) * USER_MANUAL =>... │
│                │ e93f5a7 │ Add GitHub workflow for PR job (#2896) *...        │
│                │ a10c404 │ Nix flake release - caching K and kup (#2921) *... │
│                │ 46212df │ Update dependency: llvm-...                        │
│ v5.4.9_fb67fb0 │ 5f5e2fe │ Set Version: 5.4.9                                 │
│                │ 34a03fe │ Merge remote-tracking branch 'origin/develop'      │
│                │ 8bf1a60 │ `kup` install tool + nix bash script (#2916) *...  │
│ v5.4.8         │ b6b7067 │ Set Version 5.4.8                                  │
└────────────────┴─────────┴────────────────────────────────────────────────────┘

for kore-exec:

┌─────────┬─────────┬────────────────────────────────────────────────────┐
│ Version │ Commit  │ Message                                            │
├─────────┼─────────┼────────────────────────────────────────────────────┤
│         │ 389dc03 │ Improved JSON RPC logging (#3291)                  │
│         │ 24e8a3d │ Update dependency: deps/k_release (#3282) *...     │
│         │ 81f8125 │ Add M1 mac to CI (#3278) * Add M1 mac to CI *...   │
│         │ 801b43a │ Add a debug log entry for proof generation...      │
│         │ 76027ab │ IO.logString hook implementation (#3281) * add...  │
│         │ ba227c0 │ Update dependency: deps/k_release (#3276) *...     │
│         │ 133a83e │ Using action runner permissions token for gh...    │
│         │ 3c3f31b │ Update dependency: deps/k_release (#3275) *...     │
│         │ b68c43a │ Hotfix/profiling workflow triggers (#3272) *...    │
│         │ 0875440 │ Modify Ceil simplifier to not recurse (#3209) *... │
│         │ 23530bd │ 3223 json rpc cut points and terminal rules...     │
│         │ 0a2b032 │ Add C semantics smoke test depth 100 (#3274) *...  │
│         │ a5653fa │ use state to cache simplifier across branches...   │
│         │ 8844d5c │ Add functional-spec test from KEVM (#3271) *...    │
│         │ 0c75536 │ Rewrite script which generates regressions...      │
│         │ 9ea642d │ Feature/profiling performance workflow (#3265)...  │
│         │ f9366b6 │ Nix profiling tweaks (#3268) Co-authored-by:...    │
│         │ 4a437a8 │ Handle incorrect log path for `--bug-report`...    │
│         │ ebd9860 │ Update dependency: deps/k_release (#3233) *...     │
│         │ 6e5d071 │ Disable automatic run of update job (#3258) Co-... │
│         │ 51b411a │ Adjustments to test data generators (#3262) *...   │
│         │ 5b55829 │ 3214 support not simplification rules (#3234) *... │
│         │ efeb976 │ monomorphize new unifier (#3241) * monomorphize... │
│         │ a02b15e │ Changed `ErrorDecidePredicateUnknown` into a...    │
│         │ 59f8b1f │ 3244 restrict `TermLike` test data generator...    │
│         │ 2b8b29a │ Implement new pattern matcher (#3206) * new...     │
│         │ de44aad │ Remove `ActualEntry` and refactor...               │
│         │ c1da545 │ 3243 remove strategy type (#3250) * Remove...      │
│         │ ce32dab │ Race simplifier integration test against 30sec...  │
│         │ 6b37a7d │ Add fourmolu to nix flake as a convenient...       │
└─────────┴─────────┴────────────────────────────────────────────────────┘

@ehildenb
Copy link
Member Author

ehildenb commented Oct 4, 2022

It looks good to me! Let's try it, and if people want something different they can say.One feature I would add is --count or --max-count or --max-number which is the maximum number of relaeses it should try to fetch.

@ehildenb
Copy link
Member Author

ehildenb commented Oct 4, 2022

Can we also have kup install k --version SOME_VERSION basically work the same as kup update k --version SOME_VERSION? The first seems more intuitive to me.

@goodlyrottenapple
Copy link
Contributor

the number of items it fetches is fixed. i think the API is paginated. will make kup install --version and kup update --version behave the same way

@radumereuta
Copy link
Contributor

Fixed by: #2957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants