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

Warn users when their forc toolchain is out of date #5280

Open
sdankel opened this issue Nov 15, 2023 · 1 comment
Open

Warn users when their forc toolchain is out of date #5280

sdankel opened this issue Nov 15, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request forc good first issue Good for newcomers language server LSP server

Comments

@sdankel
Copy link
Member

sdankel commented Nov 15, 2023

forc should should notify users when their active toolchain is out of date. E.g. if they use forc commands on the beta-4 toolchain, but there are new patch releases available it could have some warning message that they are on an out of date version. Same for the LSP - perhaps we could propagate this message in the editor somehow.

A single console message would be good, similar to what the github cli does when you use it and there is a new update you havent applied yet:

A new release of gh is available: 2.32.1 → 2.38.0
To upgrade, run: brew upgrade gh
https://github.com/cli/cli/releases/tag/v2.38.0
@sdankel sdankel added enhancement New feature or request forc language server LSP server good first issue Good for newcomers labels Nov 15, 2023
@crodas crodas removed their assignment Apr 17, 2024
@sdankel
Copy link
Member Author

sdankel commented Jul 1, 2024

This would be nice, but it would also require us to download the metadata file from fuelup to check if there is a new release available every time a forc command is run. If we do that, we should make the code that does that in fuelup available as a library since both forc and forc-lsp will have to do that same check.

Specifically for LSP + VSCode, we could implement this without having to download the channel by having a "latest forc version" specified in the extension (perhaps in a custom key-value pair in package.json), that we update when making a release of the VSCode plugin. The VSCode plugin already checks the executable's version before starting the server, so at that point it could check against the latest version and pop up a warning if the executable version is older than what the VSCode plugin expects.

The downside to this approach is that we'd have to remember update this minimum forc version when doing a release of the plugin in order for the warning to be up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc good first issue Good for newcomers language server LSP server
Projects
None yet
Development

No branches or pull requests

2 participants