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

Windows installer does not register stack version #5643

Closed
lunacd opened this issue Dec 1, 2021 · 2 comments · Fixed by #5660
Closed

Windows installer does not register stack version #5643

lunacd opened this issue Dec 1, 2021 · 2 comments · Fixed by #5660

Comments

@lunacd
Copy link

lunacd commented Dec 1, 2021

General summary/comments (optional)

With Windows Package Installer (winget), a package needs to register its version with Windows. Otherwise winget constantly thinks that there is an upgrade.

PS > winget upgrade
Name                                             Id                                Version        Available      Source
-----------------------------------------------------------------------------------------------------------------------
Haskell Stack                                    commercialhaskell.stack           Unknown        2.7.3          winget

I realize that this is not a stack issue specifically and that you guys owe us users nothing (we owe you guys for the work and awesome product). If somebody can give me a pointer to how the windows installer is currently packaged (I can't find it...), I can go fix it through a PR.

Steps to reproduce

Install stack. Go to Control panel -> Programs and Features. Look for Haskell Stack.

Expected

Windows should recognize Stack's version.

Actual

No version is registered.

Stack version

$ stack --version
Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@Elewyth
Copy link
Contributor

Elewyth commented Dec 30, 2021

I think the key DisplayVersion needs to be added to this script: https://github.com/commercialhaskell/stack/blob/master/etc/scripts/build-stack-installer.hs.

See microsoft/winget-cli#1255 (comment) for more information. Unfortunately, I'm not sure how to retrieve the version number. I think it needs to be passed as an argument to the build-stack-installer.hs script from https://github.com/commercialhaskell/stack/blob/master/etc/scripts/release.hs. But I couldn't figure out more, just yet.

Edit: I guess there is the function stackVersionStr in the release.hs.

Elewyth added a commit to Elewyth/stack that referenced this issue Dec 30, 2021
Elewyth added a commit to Elewyth/stack that referenced this issue Dec 30, 2021
@Elewyth
Copy link
Contributor

Elewyth commented Dec 30, 2021

Added PR #5660 adding DisplayVersion, which enables winget to properly read the installed version.

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

Successfully merging a pull request may close this issue.

3 participants